public abstract class FastClass
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FastClass.Generator |
Modifier and Type | Field and Description |
---|---|
private java.lang.Class |
type |
Modifier | Constructor and Description |
---|---|
protected |
FastClass() |
protected |
FastClass(java.lang.Class type) |
Modifier and Type | Method and Description |
---|---|
static FastClass |
create(java.lang.Class type) |
static FastClass |
create(java.lang.ClassLoader loader,
java.lang.Class type) |
boolean |
equals(java.lang.Object o) |
FastConstructor |
getConstructor(java.lang.Class[] parameterTypes) |
FastConstructor |
getConstructor(java.lang.reflect.Constructor constructor) |
abstract int |
getIndex(java.lang.Class[] parameterTypes)
Return the index of the matching constructor.
|
abstract int |
getIndex(Signature sig) |
abstract int |
getIndex(java.lang.String name,
java.lang.Class[] parameterTypes)
Return the index of the matching method.
|
java.lang.Class |
getJavaClass() |
abstract int |
getMaxIndex()
Returns the maximum method index for this class.
|
FastMethod |
getMethod(java.lang.reflect.Method method) |
FastMethod |
getMethod(java.lang.String name,
java.lang.Class[] parameterTypes) |
java.lang.String |
getName() |
protected static java.lang.String |
getSignatureWithoutReturnType(java.lang.String name,
java.lang.Class[] parameterTypes) |
int |
hashCode() |
abstract java.lang.Object |
invoke(int index,
java.lang.Object obj,
java.lang.Object[] args)
Invoke the method with the specified index.
|
java.lang.Object |
invoke(java.lang.String name,
java.lang.Class[] parameterTypes,
java.lang.Object obj,
java.lang.Object[] args) |
java.lang.Object |
newInstance() |
java.lang.Object |
newInstance(java.lang.Class[] parameterTypes,
java.lang.Object[] args) |
abstract java.lang.Object |
newInstance(int index,
java.lang.Object[] args)
Create a new instance using the specified constructor index and arguments.
|
java.lang.String |
toString() |
protected FastClass()
protected FastClass(java.lang.Class type)
public static FastClass create(java.lang.Class type)
public static FastClass create(java.lang.ClassLoader loader, java.lang.Class type)
public java.lang.Object invoke(java.lang.String name, java.lang.Class[] parameterTypes, java.lang.Object obj, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
public java.lang.Object newInstance() throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
public java.lang.Object newInstance(java.lang.Class[] parameterTypes, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
public FastMethod getMethod(java.lang.reflect.Method method)
public FastConstructor getConstructor(java.lang.reflect.Constructor constructor)
public FastMethod getMethod(java.lang.String name, java.lang.Class[] parameterTypes)
public FastConstructor getConstructor(java.lang.Class[] parameterTypes)
public java.lang.String getName()
public java.lang.Class getJavaClass()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public abstract int getIndex(java.lang.String name, java.lang.Class[] parameterTypes)
name
- the method nameparameterTypes
- the parameter array-1
if none is found.invoke(int, Object, Object[])
public abstract int getIndex(java.lang.Class[] parameterTypes)
parameterTypes
- the parameter array-1
if none is found.newInstance(int, Object[])
public abstract java.lang.Object invoke(int index, java.lang.Object obj, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException
index
- the method indexobj
- the object the underlying method is invoked fromargs
- the arguments used for the method calljava.lang.reflect.InvocationTargetException
- if the underlying method throws an exceptiongetIndex(name, Class[])
public abstract java.lang.Object newInstance(int index, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException
index
- the constructor indexargs
- the arguments passed to the constructorjava.lang.reflect.InvocationTargetException
- if the constructor throws an exceptiongetIndex(Class[])
public abstract int getIndex(Signature sig)
public abstract int getMaxIndex()
protected static java.lang.String getSignatureWithoutReturnType(java.lang.String name, java.lang.Class[] parameterTypes)