Merged gcj-eclipse branch to trunk.

From-SVN: r120621
This commit is contained in:
Tom Tromey
2007-01-09 19:58:05 +00:00
parent c648dedbde
commit 97b8365caf
17478 changed files with 606493 additions and 100744 deletions
@@ -160,8 +160,7 @@ public class AccessibleObject
this.flag = flag;
}
/* FIXME[GENERICS]: <T extends Annotation> T getAnnotation(Class <T>) */
public Annotation getAnnotation(Class annotationClass)
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
{
throw new AssertionError("Subclass must override this method");
}
@@ -176,8 +175,7 @@ public class AccessibleObject
throw new AssertionError("Subclass must override this method");
}
/* FIXME[GENERICS]: Signature is Class<? extends Annotation> */
public boolean isAnnotationPresent(Class annotationClass)
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
{
return getAnnotation(annotationClass) != null;
}
@@ -74,8 +74,7 @@ public interface AnnotatedElement
* <code>null</code> if no such annotation exists.
* @throws NullPointerException if the annotation class is <code>null</code>.
*/
/* FIXME[GENERICS]: <T extends Annotation> T getAnnotation(Class <T>) */
Annotation getAnnotation(Class annotationClass);
<T extends Annotation> T getAnnotation(Class<T> annotationClass);
/**
* Returns all annotations associated with the element. If there are
@@ -111,7 +110,6 @@ public interface AnnotatedElement
* @return true if an annotation exists for the specified type.
* @since 1.5
*/
/* FIXME[GENERICS]: Signature is Class<? extends Annotation> */
boolean isAnnotationPresent(Class annotationClass);
boolean isAnnotationPresent(Class<? extends Annotation> annotationClass);
}
@@ -95,7 +95,7 @@ public final class Array
* @throws NegativeArraySizeException when length is less than 0
* @throws OutOfMemoryError if memory allocation fails
*/
public static Object newInstance(Class componentType, int length)
public static Object newInstance(Class<?> componentType, int length)
{
if (! componentType.isPrimitive())
return VMArray.createObjectArray(componentType, length);
@@ -143,7 +143,7 @@ public final class Array
* than 0
* @throws OutOfMemoryError if memory allocation fails
*/
public static Object newInstance(Class componentType, int[] dimensions)
public static Object newInstance(Class<?> componentType, int[] dimensions)
{
if (dimensions.length <= 0)
throw new IllegalArgumentException ("Empty dimensions array.");
@@ -58,6 +58,5 @@ public interface GenericDeclaration
* class file does not conform to that specified in the 3rd edition
* of the Java Virtual Machine Specification.
*/
/* FIXME[GENERICS]: Should be TypeVariable<?>[] */
TypeVariable[] getTypeParameters();
TypeVariable<?>[] getTypeParameters();
}
@@ -156,7 +156,7 @@ import java.util.Set;
* @see Class
* @author Eric Blake (ebb9@email.byu.edu)
* @since 1.3
* @status updated to 1.4, except for the use of ProtectionDomain
* @status updated to 1.5, except for the use of ProtectionDomain
*/
public class Proxy implements Serializable
{
@@ -255,8 +255,8 @@ public class Proxy implements Serializable
*/
// synchronized so that we aren't trying to build the same class
// simultaneously in two threads
public static synchronized Class getProxyClass(ClassLoader loader,
Class[] interfaces)
public static synchronized Class<?> getProxyClass(ClassLoader loader,
Class<?>... interfaces)
{
interfaces = (Class[]) interfaces.clone();
ProxyType pt = new ProxyType(loader, interfaces);
@@ -310,7 +310,7 @@ public class Proxy implements Serializable
* @see Constructor#newInstance(Object[])
*/
public static Object newProxyInstance(ClassLoader loader,
Class[] interfaces,
Class<?>[] interfaces,
InvocationHandler handler)
{
try
@@ -358,7 +358,7 @@ public class Proxy implements Serializable
*/
// This is synchronized on the off chance that another thread is
// trying to add a class to the map at the same time we read it.
public static synchronized boolean isProxyClass(Class clazz)
public static synchronized boolean isProxyClass(Class<?> clazz)
{
if (! Proxy.class.isAssignableFrom(clazz))
return false;
@@ -58,9 +58,7 @@ package java.lang.reflect;
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
/* FIXME[GENERICS]: Should be TypeVariable<T extends GenericDeclaration> */
public interface TypeVariable
extends Type
public interface TypeVariable<T extends GenericDeclaration> extends Type
{
/**
@@ -86,8 +84,7 @@ public interface TypeVariable
* @return the <code>GenericDeclaration</code> object for this type
* variable.
*/
/* FIXME[GENERICS]: Should return type T */
GenericDeclaration getGenericDeclaration();
T getGenericDeclaration();
/**
* Returns the name of the type variable, as written in the source