Class FastClass
java.lang.Object
org.springframework.cglib.reflect.FastClass
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FastClass
static FastClass
create
(ClassLoader loader, Class type) boolean
getConstructor
(Class[] parameterTypes) getConstructor
(Constructor constructor) abstract int
Return the index of the matching constructor.abstract int
Return the index of the matching method.abstract int
abstract int
Returns the maximum method index for this class.getName()
protected static String
getSignatureWithoutReturnType
(String name, Class[] parameterTypes) int
hashCode()
abstract Object
Invoke the method with the specified index.abstract Object
newInstance
(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
public int 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
-1
if 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
-1
if 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
-