diff options
Diffstat (limited to 'libjava/java/lang')
-rw-r--r-- | libjava/java/lang/Object.java | 4 | ||||
-rw-r--r-- | libjava/java/lang/reflect/Array.java | 6 | ||||
-rw-r--r-- | libjava/java/lang/reflect/Constructor.java | 12 | ||||
-rw-r--r-- | libjava/java/lang/reflect/Method.java | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/libjava/java/lang/Object.java b/libjava/java/lang/Object.java index e81a48a..740a7c7 100644 --- a/libjava/java/lang/Object.java +++ b/libjava/java/lang/Object.java @@ -1,5 +1,5 @@ /* java.lang.Object - The universal superclass in Java - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -129,7 +129,7 @@ public class Object * * @return the class of this Object */ - public final native Class getClass(); + public final native Class<? extends Object> getClass(); /** * Get a value that represents this Object, as uniquely as diff --git a/libjava/java/lang/reflect/Array.java b/libjava/java/lang/reflect/Array.java index 32bed06..639cc0e 100644 --- a/libjava/java/lang/reflect/Array.java +++ b/libjava/java/lang/reflect/Array.java @@ -1,5 +1,5 @@ /* java.lang.reflect.Array - manipulate arrays by reflection - Copyright (C) 1998, 1999, 2001, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -104,7 +104,7 @@ public final class Array * @throws NegativeArraySizeException when length is less than 0 * @throws OutOfMemoryError if memory allocation fails */ - public static native Object newInstance(Class componentType, int length); + public static native Object newInstance(Class<?> componentType, int length); /** * Creates a new multi-dimensioned array. The new array has the same @@ -130,7 +130,7 @@ public final class Array * than 0 * @throws OutOfMemoryError if memory allocation fails */ - public static native Object newInstance(Class elementType, int[] dimensions); + public static native Object newInstance(Class<?> elementType, int[] dimensions); /** * Gets the array length. diff --git a/libjava/java/lang/reflect/Constructor.java b/libjava/java/lang/reflect/Constructor.java index 83aae3b..adebc60 100644 --- a/libjava/java/lang/reflect/Constructor.java +++ b/libjava/java/lang/reflect/Constructor.java @@ -1,5 +1,5 @@ /* java.lang.reflect.Constructor - reflection of Java constructors - Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 + Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -155,11 +155,11 @@ public final class Constructor<T> extends AccessibleObject * * @return a list of the types of the constructor's parameters */ - public Class[] getParameterTypes () + public Class<?>[] getParameterTypes () { if (parameter_types == null) getType (); - return (Class[]) parameter_types.clone(); + return (Class<?>[]) parameter_types.clone(); } /** @@ -169,11 +169,11 @@ public final class Constructor<T> extends AccessibleObject * * @return a list of the types in the constructor's throws clause */ - public Class[] getExceptionTypes () + public Class<?>[] getExceptionTypes () { if (exception_types == null) getType(); - return (Class[]) exception_types.clone(); + return (Class<?>[]) exception_types.clone(); } /** @@ -305,7 +305,7 @@ public final class Constructor<T> extends AccessibleObject * @throws ExceptionInInitializerError if construction triggered class * initialization, which then failed */ - public native Object newInstance (Object[] args) + public native T newInstance (Object... args) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException; diff --git a/libjava/java/lang/reflect/Method.java b/libjava/java/lang/reflect/Method.java index fc0bf10..6fa2956 100644 --- a/libjava/java/lang/reflect/Method.java +++ b/libjava/java/lang/reflect/Method.java @@ -1,6 +1,6 @@ // Method.java - Represent method of class or interface. -/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007 Free Software Foundation This file is part of libgcj. @@ -68,7 +68,7 @@ public final class Method * is a non-inherited member. * @return the class that declared this member */ - public Class getDeclaringClass() + public Class<?> getDeclaringClass() { return declaringClass; } |