C
- The Class to be accessedpublic abstract class AsmClassAccess<C> extends AbstractClassAccess<C> implements ClassAccess<C>
fieldNames
Modifier | Constructor and Description |
---|---|
protected |
AsmClassAccess(Class<C> clazz)
Constructor, intended for use by generated subclasses
|
Modifier and Type | Method and Description |
---|---|
protected <X> ClassAccess<X> |
constructClassAccess(Class<X> clazz) |
protected FieldAccess<C> |
constructFieldAccess(Field field) |
protected MethodAccess<C> |
constructMethodAccess(Method method) |
static <C> AsmClassAccess<C> |
get(Class<C> clazz)
Get a new instance that can access the given Class.
|
abstract boolean |
getBooleanValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract byte |
getByteValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract char |
getCharValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract double |
getDoubleValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract float |
getFloatValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract int |
getIntValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract long |
getLongValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract short |
getShortValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract Object |
getValue(C object,
String fieldName)
Retrieve the value of the field for the given instance
|
abstract Object |
invokeMethod(Object target,
Method method,
Object[] args)
Invoke the given method on the given instance
|
Object |
invokeMethod2(Object target,
Method method,
Object[] args) |
boolean |
isNonStaticMemberClass()
Indicates if the class being accessed is a non-static member class
|
abstract C |
newInstance()
Create a new, uninitialised instance of the given class (if supported).
|
abstract void |
putBooleanValue(C object,
String fieldName,
boolean value)
Update the value of the field for the given instance
|
abstract void |
putByteValue(C object,
String fieldName,
byte value)
Update the value of the field for the given instance
|
abstract void |
putCharValue(C object,
String fieldName,
char value)
Update the value of the field for the given instance
|
abstract void |
putDoubleValue(C object,
String fieldName,
double value)
Update the value of the field for the given instance
|
abstract void |
putFloatValue(C object,
String fieldName,
float value)
Update the value of the field for the given instance
|
abstract void |
putIntValue(C object,
String fieldName,
int value)
Update the value of the field for the given instance
|
abstract void |
putLongValue(C object,
String fieldName,
long value)
Update the value of the field for the given instance
|
abstract void |
putShortValue(C object,
String fieldName,
short value)
Update the value of the field for the given instance
|
abstract void |
putValue(C object,
String fieldName,
Object value)
Update the value of the field for the given instance
|
getClassModel, getDeclaredFieldAccess, getDeclaredFieldAccessors, getDeclaredFieldNames, getDeclaredFields, getDeclaredMethodAccess, getDeclaredMethodAccessors, getDeclaredMethodNames, getDeclaredMethods, getSuperClassAccess, getType, providesEquals, providesHashCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClassModel, getDeclaredFieldAccess, getDeclaredFieldAccessors, getDeclaredMethodAccess, getDeclaredMethodAccessors, getSuperClassAccess, getType, providesEquals, providesHashCode
protected AsmClassAccess(Class<C> clazz)
clazz
- The Class to be accessedpublic boolean isNonStaticMemberClass()
public static <C> AsmClassAccess<C> get(Class<C> clazz)
C
- The type of classclazz
- Class to be accessedpublic abstract C newInstance()
ClassAccess
newInstance
in interface ClassAccess<C>
public abstract Object getValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putValue(C object, String fieldName, Object value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new valuepublic abstract boolean getBooleanValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putBooleanValue(C object, String fieldName, boolean value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new boolean valuepublic abstract byte getByteValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putByteValue(C object, String fieldName, byte value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new byte valuepublic abstract char getCharValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putCharValue(C object, String fieldName, char value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new char valuepublic abstract short getShortValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putShortValue(C object, String fieldName, short value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new short valuepublic abstract int getIntValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putIntValue(C object, String fieldName, int value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new int valuepublic abstract long getLongValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putLongValue(C object, String fieldName, long value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new long valuepublic abstract float getFloatValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putFloatValue(C object, String fieldName, float value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new float valuepublic abstract double getDoubleValue(C object, String fieldName)
object
- The instance to access the field forfieldName
- Name of the field to accesspublic abstract void putDoubleValue(C object, String fieldName, double value)
object
- The instance to access the field forfieldName
- Name of the field to accessvalue
- The new double valuepublic abstract Object invokeMethod(Object target, Method method, Object[] args)
target
- The target objectmethod
- The method to invokeargs
- The parameters to passpublic Object invokeMethod2(Object target, Method method, Object[] args)
protected MethodAccess<C> constructMethodAccess(Method method)
constructMethodAccess
in class AbstractClassAccess<C>
protected FieldAccess<C> constructFieldAccess(Field field)
constructFieldAccess
in class AbstractClassAccess<C>
protected <X> ClassAccess<X> constructClassAccess(Class<X> clazz)
constructClassAccess
in class AbstractClassAccess<C>
Copyright © 2010–2018 Jadira Systems. All rights reserved.