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