Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
@@ -415,8 +415,9 @@ final class VMClassLoader
|
||||
{
|
||||
byte[] modifiedData = new byte[len];
|
||||
System.arraycopy(data, offset, modifiedData, 0, len);
|
||||
String jvmName = name.replace('.', '/');
|
||||
modifiedData =
|
||||
((InstrumentationImpl)instrumenter).callTransformers(loader, name,
|
||||
((InstrumentationImpl)instrumenter).callTransformers(loader, jvmName,
|
||||
null, pd, modifiedData);
|
||||
|
||||
return defineClass(loader, name, modifiedData, 0, modifiedData.length,
|
||||
|
||||
@@ -77,11 +77,11 @@ import java.util.Arrays;
|
||||
* @since 1.1
|
||||
* @status updated to 1.4
|
||||
*/
|
||||
public final class Constructor
|
||||
public final class Constructor<T>
|
||||
extends AccessibleObject
|
||||
implements GenericDeclaration, Member
|
||||
{
|
||||
private Class clazz;
|
||||
private Class<T> clazz;
|
||||
private int slot;
|
||||
|
||||
private static final int CONSTRUCTOR_MODIFIERS
|
||||
@@ -104,7 +104,7 @@ public final class Constructor
|
||||
* Gets the class that declared this constructor.
|
||||
* @return the class that declared this member
|
||||
*/
|
||||
public Class getDeclaringClass()
|
||||
public Class<T> getDeclaringClass()
|
||||
{
|
||||
return clazz;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ public final class Constructor
|
||||
*
|
||||
* @return a list of the types of the constructor's parameters
|
||||
*/
|
||||
public native Class[] getParameterTypes();
|
||||
public native Class<?>[] getParameterTypes();
|
||||
|
||||
/**
|
||||
* Get the exception types this constructor says it throws, in no particular
|
||||
@@ -175,7 +175,7 @@ public final class Constructor
|
||||
*
|
||||
* @return a list of the types in the constructor's throws clause
|
||||
*/
|
||||
public native Class[] getExceptionTypes();
|
||||
public native Class<?>[] getExceptionTypes();
|
||||
|
||||
/**
|
||||
* Compare two objects to see if they are semantically equivalent.
|
||||
@@ -244,8 +244,8 @@ public final class Constructor
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/* FIXME[GENERICS]: Add X extends GenericDeclaration and TypeVariable<X> */
|
||||
static void addTypeParameters(StringBuilder sb, TypeVariable[] typeArgs)
|
||||
static <X extends GenericDeclaration>
|
||||
void addTypeParameters(StringBuilder sb, TypeVariable<X>[] typeArgs)
|
||||
{
|
||||
if (typeArgs.length == 0)
|
||||
return;
|
||||
@@ -313,15 +313,15 @@ public final class Constructor
|
||||
* @throws ExceptionInInitializerError if construction triggered class
|
||||
* initialization, which then failed
|
||||
*/
|
||||
public Object newInstance(Object args[])
|
||||
public T newInstance(Object... args)
|
||||
throws InstantiationException, IllegalAccessException,
|
||||
InvocationTargetException
|
||||
{
|
||||
return constructNative(args, clazz, slot);
|
||||
}
|
||||
|
||||
private native Object constructNative(Object[] args, Class declaringClass,
|
||||
int slot)
|
||||
private native T constructNative(Object[] args, Class declaringClass,
|
||||
int slot)
|
||||
throws InstantiationException, IllegalAccessException,
|
||||
InvocationTargetException;
|
||||
|
||||
@@ -337,8 +337,7 @@ public final class Constructor
|
||||
* specification, version 3.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: Add <Constructor<T>> */
|
||||
public TypeVariable[] getTypeParameters()
|
||||
public TypeVariable<Constructor<T>>[] getTypeParameters()
|
||||
{
|
||||
String sig = getSignature();
|
||||
if (sig == null)
|
||||
@@ -395,4 +394,3 @@ public final class Constructor
|
||||
return p.getGenericParameterTypes();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ extends AccessibleObject implements Member
|
||||
* is a non-inherited member.
|
||||
* @return the class that declared this member
|
||||
*/
|
||||
public Class getDeclaringClass()
|
||||
public Class<?> getDeclaringClass()
|
||||
{
|
||||
return declaringClass;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ extends AccessibleObject implements Member
|
||||
* Gets the type of this field.
|
||||
* @return the type of this field
|
||||
*/
|
||||
public native Class getType();
|
||||
public native Class<?> getType();
|
||||
|
||||
/**
|
||||
* Compare two objects to see if they are semantically equivalent.
|
||||
@@ -213,7 +213,7 @@ extends AccessibleObject implements Member
|
||||
sb.append(getName());
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
public String toGenericString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(64);
|
||||
@@ -658,5 +658,4 @@ extends AccessibleObject implements Member
|
||||
* is no Signature attribute, return null.
|
||||
*/
|
||||
private native String getSignature();
|
||||
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
* is a non-inherited member.
|
||||
* @return the class that declared this member
|
||||
*/
|
||||
public Class getDeclaringClass()
|
||||
public Class<?> getDeclaringClass()
|
||||
{
|
||||
return declaringClass;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
* Gets the return type of this method.
|
||||
* @return the type of this method
|
||||
*/
|
||||
public native Class getReturnType();
|
||||
public native Class<?> getReturnType();
|
||||
|
||||
/**
|
||||
* Get the parameter list for this method, in declaration order. If the
|
||||
@@ -180,7 +180,7 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
*
|
||||
* @return a list of the types of the method's parameters
|
||||
*/
|
||||
public native Class[] getParameterTypes();
|
||||
public native Class<?>[] getParameterTypes();
|
||||
|
||||
/**
|
||||
* Get the exception types this method says it throws, in no particular
|
||||
@@ -189,7 +189,7 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
*
|
||||
* @return a list of the types in the method's throws clause
|
||||
*/
|
||||
public native Class[] getExceptionTypes();
|
||||
public native Class<?>[] getExceptionTypes();
|
||||
|
||||
/**
|
||||
* Compare two objects to see if they are semantically equivalent.
|
||||
@@ -349,7 +349,7 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
* @throws ExceptionInInitializerError if accessing a static method triggered
|
||||
* class initialization, which then failed
|
||||
*/
|
||||
public Object invoke(Object o, Object[] args)
|
||||
public Object invoke(Object o, Object... args)
|
||||
throws IllegalAccessException, InvocationTargetException
|
||||
{
|
||||
return invokeNative(o, args, declaringClass, slot);
|
||||
@@ -375,8 +375,7 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
* specification, version 3.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: Should be TypeVariable<Method>[] */
|
||||
public TypeVariable[] getTypeParameters()
|
||||
public TypeVariable<Method>[] getTypeParameters()
|
||||
{
|
||||
String sig = getSignature();
|
||||
if (sig == null)
|
||||
@@ -451,4 +450,3 @@ extends AccessibleObject implements Member, GenericDeclaration
|
||||
return p.getGenericReturnType();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user