|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.reflect.plugins.javassist.bytecode.JavassistMemberFactory
public abstract class JavassistMemberFactory
Abstract base class to create implementations of the JavassistMethod
, JavassistConstructor
and JavassistField
interfaces.
This implementation generates raw bytecode to avoid the overhead of compilation via javassist. If
sun.reflect.MagicAccessorImpl
is used as the superClass
field the implementation
classes can access private and protected members of the target class.
Field Summary | |
---|---|
protected static AtomicInteger |
counter
The method class counter |
protected static String |
OBJECT_NAME
Object class name |
protected static String[] |
THROWABLE_EXCEPTIONS
Array of exceptions containing jvm name of Throwable |
Method Summary | ||
---|---|---|
static JavassistConstructor |
createJavassistConstructor(Class<?> superClass,
JavassistConstructorInfo constructor,
boolean debug)
Creates a new JavassistConstructor implementation for a given constructor |
|
static JavassistField |
createJavassistField(Class<?> superClass,
JavassistFieldInfo field,
boolean debug)
Creates a new JavassistField implementation for a given field |
|
static JavassistMethod |
createJavassistMethod(Class<?> superClass,
JavassistMethodInfo method,
boolean debug)
Creates a new JavassistMethod implementation for a given method |
|
protected
|
instantiate(Class<T> clazz)
Instantiates the class |
|
protected
|
makeClass(Class<T> expected,
JavassistTypeInfo target)
Creates a JavassistMethod/-Field/-Constructor implementation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String OBJECT_NAME
protected static final String[] THROWABLE_EXCEPTIONS
protected static final AtomicInteger counter
Method Detail |
---|
public static JavassistMethod createJavassistMethod(Class<?> superClass, JavassistMethodInfo method, boolean debug)
superClass
- the super class of the JavassistMethod implementationmethod
- the JavassistMethodInfo for which we want to create a JavassistMethod implementationdebug
- true if the bytecode should be output to file
RuntimeException
- if an error ocurredpublic static JavassistConstructor createJavassistConstructor(Class<?> superClass, JavassistConstructorInfo constructor, boolean debug)
superClass
- the super class of the JavassistConstructor implementationconstructor
- the JavassistConstructorInfo for which we want to create a JavassistConstructor implementationdebug
- true if the bytecode should be output to file
RuntimeException
- if an error ocurredpublic static JavassistField createJavassistField(Class<?> superClass, JavassistFieldInfo field, boolean debug)
superClass
- the super class of the JavassistField implementationfield
- the JavassistFieldInfo for which we want to create a JavassistField implementationdebug
- true if the bytecode should be output to file
RuntimeException
- if an error ocurredprotected <T> T instantiate(Class<T> clazz)
clazz
- the class
RuntimeException
- if an error ocurredprotected <T> Class<T> makeClass(Class<T> expected, JavassistTypeInfo target)
|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |