Class FastClass
java.lang.Object
org.springframework.cglib.reflect.FastClass
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FastClassstatic FastClasscreate(ClassLoader loader, Class type) booleangetConstructor(Class[] parameterTypes) getConstructor(Constructor constructor) abstract intReturn the index of the matching constructor.abstract intReturn the index of the matching method.abstract intabstract intReturns the maximum method index for this class.getName()protected static StringgetSignatureWithoutReturnType(String name, Class[] parameterTypes) inthashCode()abstract ObjectInvoke the method with the specified index.abstract ObjectnewInstance(int index, Object[] args) Create a new instance using the specified constructor index and arguments.newInstance(Class[] parameterTypes, Object[] args) toString()
-
Constructor Details
-
FastClass
protected FastClass() -
FastClass
-
-
Method Details
-
create
-
create
-
invoke
public Object invoke(String name, Class[] parameterTypes, Object obj, Object[] args) throws InvocationTargetException - Throws:
InvocationTargetException
-
newInstance
- Throws:
InvocationTargetException
-
newInstance
- Throws:
InvocationTargetException
-
getMethod
-
getConstructor
-
getMethod
-
getConstructor
-
getName
-
getJavaClass
-
toString
-
hashCode
-
equals
-
getIndex
Return the index of the matching method. The index may be used later to invoke the method with less overhead. If more than one method matches (i.e. they differ by return type only), one is chosen arbitrarily.- Parameters:
name- the method nameparameterTypes- the parameter array- Returns:
- the index, or
-1if none is found. - See Also:
-
getIndex
Return the index of the matching constructor. The index may be used later to create a new instance with less overhead.- Parameters:
parameterTypes- the parameter array- Returns:
- the constructor index, or
-1if none is found. - See Also:
-
invoke
public abstract Object invoke(int index, Object obj, Object[] args) throws InvocationTargetException Invoke the method with the specified index.- Parameters:
index- the method indexobj- the object the underlying method is invoked fromargs- the arguments used for the method call- Throws:
InvocationTargetException- if the underlying method throws an exception- See Also:
-
newInstance
Create a new instance using the specified constructor index and arguments.- Parameters:
index- the constructor indexargs- the arguments passed to the constructor- Throws:
InvocationTargetException- if the constructor throws an exception- See Also:
-
getIndex
-
getMaxIndex
public abstract int getMaxIndex()Returns the maximum method index for this class. -
getSignatureWithoutReturnType
-