public class FastClass
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
static FastClass |
create(java.lang.Class type)
Constructs a FastClass
|
boolean |
equals(java.lang.Object o) |
int |
getIndex(java.lang.Class[] parameterTypes)
Locate the index of a constructor
|
int |
getIndex(java.lang.String name,
java.lang.Class[] parameterTypes)
Locate the index of a method
|
java.lang.Class |
getJavaClass()
Get the wrapped java class reference
|
java.lang.String |
getName()
Get the wrapped class name
|
int |
hashCode() |
java.lang.Object |
invoke(int index,
java.lang.Object obj,
java.lang.Object[] args)
Access to invoke a method on the class that this fast class handles by its index
|
java.lang.Object |
invoke(java.lang.String name,
java.lang.Class[] parameterTypes,
java.lang.Object obj,
java.lang.Object[] args)
Access to invoke a method on the class that this fast class handles
|
java.lang.Object |
newInstance()
Invoke the default constructor
|
java.lang.Object |
newInstance(java.lang.Class[] parameterTypes,
java.lang.Object[] args)
Invoke a parameterized constructor
|
java.lang.Object |
newInstance(int index,
java.lang.Object[] args)
Invoke a constructor by its index
|
java.lang.String |
toString() |
public static FastClass create(java.lang.Class type)
type - The class to optimizepublic 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
name - The name of the method to invoke,parameterTypes - The method parameter typesobj - The instance on which to invoke the methodargs - The parameter argumentsjava.lang.reflect.InvocationTargetException - Indicates a problem performing invocationpublic java.lang.Object invoke(int index,
java.lang.Object obj,
java.lang.Object[] args)
throws java.lang.reflect.InvocationTargetException
index - The method indexobj - The instance on which to invoke the methodargs - The parameter argumentsjava.lang.reflect.InvocationTargetException - Indicates a problem performing invocationpublic java.lang.Object newInstance()
throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException - Indicates a problem performing invocationpublic java.lang.Object newInstance(java.lang.Class[] parameterTypes,
java.lang.Object[] args)
throws java.lang.reflect.InvocationTargetException
parameterTypes - The parameter typesargs - The parameter arguments to pass alongjava.lang.reflect.InvocationTargetException - Indicates a problem performing invocationpublic java.lang.Object newInstance(int index,
java.lang.Object[] args)
throws java.lang.reflect.InvocationTargetException
index - The constructor indexargs - The parameter arguments to pass alongjava.lang.reflect.InvocationTargetException - Indicates a problem performing invocationpublic int getIndex(java.lang.String name,
java.lang.Class[] parameterTypes)
name - The method nameparameterTypes - The method parameter typespublic int getIndex(java.lang.Class[] parameterTypes)
parameterTypes - The constructor parameter typespublic java.lang.String getName()
public java.lang.Class getJavaClass()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.