|
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.bytecode.accessor.generated.GeneratedMemberAccessorFactory
public abstract class GeneratedMemberAccessorFactory
Abstract base class to create implementations of the MethodAccessor
, ConstructorAccessor
and FieldAccessor
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 ConstructorAccessor |
generateConstructorAccessor(Class<?> superClass,
BytecodeConstructorInfo constructor,
boolean debug)
Creates a new GeneratedConstructor implementation for a given constructor |
|
static FieldAccessor |
generateFieldAccessor(Class<?> superClass,
BytecodeFieldInfo field,
boolean debug)
Creates a new GeneratedField implementation for a given field |
|
static MethodAccessor |
generateMethodAccessor(Class<?> superClass,
BytecodeMethodInfo method,
boolean debug)
Creates a new GeneratedMethod implementation for a given method |
|
protected
|
instantiate(Class<T> clazz)
Instantiates the class |
|
protected
|
makeClass(Class<T> expected,
BytecodeTypeInfo target)
Creates a Method-/Field-/ConstructorAccessor 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 MethodAccessor generateMethodAccessor(Class<?> superClass, BytecodeMethodInfo method, boolean debug)
superClass
- the super class of the GeneratedMethod implementationmethod
- the BytecodeMethodInfo for which we want to create a GeneratedMethod implementationdebug
- true if the bytecode should be output to file
RuntimeException
- if an error ocurredpublic static ConstructorAccessor generateConstructorAccessor(Class<?> superClass, BytecodeConstructorInfo constructor, boolean debug)
superClass
- the super class of the GeneratedConstructor implementationconstructor
- the BytecodeConstructorInfo for which we want to create a GeneratedConstructor implementationdebug
- true if the bytecode should be output to file
RuntimeException
- if an error ocurredpublic static FieldAccessor generateFieldAccessor(Class<?> superClass, BytecodeFieldInfo field, boolean debug)
superClass
- the super class of the GeneratedField implementationfield
- the BytecodeFieldInfo for which we want to create a GeneratedField 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, BytecodeTypeInfo target)
|
JBoss Reflection 2.2.1.SP1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |