[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [generics] Additions and fixes to java.lang.Class and assoc
From: |
Andrew John Hughes |
Subject: |
[cp-patches] [generics] Additions and fixes to java.lang.Class and associated classes. |
Date: |
Thu, 9 Jun 2005 00:23:59 +0100 |
User-agent: |
Mutt/1.5.9i |
I'm committing the attached patch which fixes a few things
in the area of java.lang.Class and related classes, and adds
the remaining missing methods (mainly as native stubs for
VM implementation).
Changelog:
2005-06-09 Andrew John Hughes <address@hidden>
* java/lang/Class.java:
(internalGetClasses()): Use collections with type parameters.
(internalGetFields()): Likewise.
(internalGetMethods()): Likewise.
(getSuperclass()): Changed to new return type.
(asSubclass(Class<U>)): Documented.
(getEnumConstants()): Calls VMClass.
(getAnnotation(Class<?>)): Implemented.
(getAnnotations()): Implemented.
(getCanonicalName()): Implemented.
(getDeclaredAnnotations()): Implemented.
(getEnclosingClass()): Implemented.
(getEnclosingConstructor()): Implemented.
(getEnclosingMethod()): Implemented.
(getGenericInterfaces()): Implemented.
(getGenericSuperclass()): Implemented.
(getTypeParameters()): Implemented.
(isAnnotationPresent(Class<?>)): Implemented.
(isAnonymousClass()): Implemented.
(isLocalClass()): Implemented.
(isMemberClass()): Implemented.
* java/lang/Package.java:
(getAnnotation(Class<?>)): Implemented.
(getAnnotations()): Implemented.
(getDeclaredAnnotations()): Implemented.
(isAnnotationPresent(Class<?>)): Implemented.
* java/lang/annotation/AnnotationTypeMismatchException.java:
Added serial version UID.
* java/lang/annotation/ElementType.java: Likewise.
* java/lang/annotation/RetentionPolicy.java: Likewise.
* java/lang/reflect/AnnotatedElement.java: Documented.
* java/lang/reflect/Modifier.java:
(toString(int)): Switched to using StringBuilder.
(toString(int,StringBuilder)): Likewise.
* vm/reference/java/lang/VMClass.java:
(getSuperClass(Class<T>)): Updated return type.
(getSimpleName(Class<?>)): Use VM methods directly.
(getEnumConstants(Class<T>)): Implementation moved from Class.
(getDeclaredAnnotations(Class<?>)): New native method.
(getCanonicalName(Class<?>)): Implemented.
(getEnclosingClass(Class<?>)): New native method.
(getEnclosingConstructor(Class<?>)): New native method.
(getEnclosingMethod(Class<?>)): New native method.
(getGenericInterfaces(Class<?>)): New native method.
(getGenericSuperclass(Class<?>)): New native method.
(getTypeParameters(Class<T>)): New native method.
(isAnonymousClass(Class<?>)): New native method.
(isLocalClass(Class<?>)): New native method.
(isMemberClass(Class<?>)): New native method.
* vm/reference/java/lang/VMPackage.java:
New VM class corresponding to java.lang.Package.
(getDeclaredAnnotations(Class<?>)): New native method.
* vm/reference/java/lang/VMSystem.java:
Removed unnecessary imports.
* vm/reference/java/lang/reflect/Constructor.java:
(toString()): Changed StringBuffer to StringBuilder.
(getTypeParameters()): Changed to native method.
* vm/reference/java/lang/reflect/Field.java:
(toString()): Changed StringBuffer to StringBuilder.
* vm/reference/java/lang/reflect/Method.java:
(getReturnType()): Updated return type.
(toString()): Changed StringBuffer to StringBuilder.
(invoke(Object,...)): Updated arguments.
--
Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
No software patents in Europe -- http://nosoftwarepatents.com
"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
class-01.diff
Description: Text document
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [generics] Additions and fixes to java.lang.Class and associated classes.,
Andrew John Hughes <=