C
- The Class containing the Field to be accessedpublic class UnsafeFieldAccess<C> extends Object implements FieldAccess<C>
Modifier and Type | Class and Description |
---|---|
static class |
UnsafeFieldAccess.UnsafeBooleanFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing boolean fields
|
static class |
UnsafeFieldAccess.UnsafeByteFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing byte fields
|
static class |
UnsafeFieldAccess.UnsafeCharFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing char fields
|
static class |
UnsafeFieldAccess.UnsafeDoubleFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing double fields
|
static class |
UnsafeFieldAccess.UnsafeFloatFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing float fields
|
static class |
UnsafeFieldAccess.UnsafeIntFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing int fields
|
static class |
UnsafeFieldAccess.UnsafeLongFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing long fields
|
static class |
UnsafeFieldAccess.UnsafeShortFieldAccess<C>
UnsafeFieldAccess implementation suitable for accessing short fields
|
Modifier and Type | Method and Description |
---|---|
Class<C> |
declaringClass()
Get the Class containing the field being accessed
|
Field |
field()
Get the Field being accessed
|
Class<?> |
fieldClass()
Get the type for the field being accessed
|
long |
fieldOffset()
Get the offset position (in bytes) for this field
|
static <C> UnsafeFieldAccess<C> |
get(Field f)
Get a new instance that can access the given Field
|
boolean |
getBooleanValue(C parent)
Retrieve the value of the field for the given instance
|
byte |
getByteValue(C parent)
Retrieve the value of the field for the given instance
|
char |
getCharValue(C parent)
Retrieve the value of the field for the given instance
|
double |
getDoubleValue(C parent)
Retrieve the value of the field for the given instance
|
float |
getFloatValue(C parent)
Retrieve the value of the field for the given instance
|
int |
getIntValue(C parent)
Retrieve the value of the field for the given instance
|
long |
getLongValue(C parent)
Retrieve the value of the field for the given instance
|
short |
getShortValue(C parent)
Retrieve the value of the field for the given instance
|
Object |
getValue(C parent)
Retrieve the value of the field for the given instance
|
void |
putBooleanValue(C parent,
boolean newFieldValue)
Update the value of the field for the given instance
|
void |
putByteValue(C parent,
byte newFieldValue)
Update the value of the field for the given instance
|
void |
putCharValue(C parent,
char newFieldValue)
Update the value of the field for the given instance
|
void |
putDoubleValue(C parent,
double newFieldValue)
Update the value of the field for the given instance
|
void |
putFloatValue(C parent,
float newFieldValue)
Update the value of the field for the given instance
|
void |
putIntValue(C parent,
int newFieldValue)
Update the value of the field for the given instance
|
void |
putLongValue(C parent,
long newFieldValue)
Update the value of the field for the given instance
|
void |
putShortValue(C parent,
short newFieldValue)
Update the value of the field for the given instance
|
void |
putValue(C parent,
Object newFieldValue)
Update the value of the field for the given instance
|
public Class<C> declaringClass()
FieldAccess
declaringClass
in interface FieldAccess<C>
public Class<?> fieldClass()
FieldAccess
fieldClass
in interface FieldAccess<C>
public Field field()
FieldAccess
field
in interface FieldAccess<C>
public long fieldOffset()
public Object getValue(C parent)
FieldAccess
getValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic boolean getBooleanValue(C parent)
FieldAccess
getBooleanValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic byte getByteValue(C parent)
FieldAccess
getByteValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic char getCharValue(C parent)
FieldAccess
getCharValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic short getShortValue(C parent)
FieldAccess
getShortValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic int getIntValue(C parent)
FieldAccess
getIntValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic long getLongValue(C parent)
FieldAccess
getLongValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic float getFloatValue(C parent)
FieldAccess
getFloatValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic double getDoubleValue(C parent)
FieldAccess
getDoubleValue
in interface FieldAccess<C>
parent
- The instance to access the field forpublic void putValue(C parent, Object newFieldValue)
FieldAccess
putValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new valuepublic void putBooleanValue(C parent, boolean newFieldValue)
FieldAccess
putBooleanValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a booleanpublic void putByteValue(C parent, byte newFieldValue)
FieldAccess
putByteValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a bytepublic void putCharValue(C parent, char newFieldValue)
FieldAccess
putCharValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a charpublic void putShortValue(C parent, short newFieldValue)
FieldAccess
putShortValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a shortpublic void putIntValue(C parent, int newFieldValue)
FieldAccess
putIntValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as an intpublic void putLongValue(C parent, long newFieldValue)
FieldAccess
putLongValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a longpublic void putFloatValue(C parent, float newFieldValue)
FieldAccess
putFloatValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a floatpublic void putDoubleValue(C parent, double newFieldValue)
FieldAccess
putDoubleValue
in interface FieldAccess<C>
parent
- The instance to access the field fornewFieldValue
- The new value as a doublepublic static <C> UnsafeFieldAccess<C> get(Field f)
C
- The type of class containing the field to be accessedf
- Field to be accessedCopyright © 2010–2018 Jadira Systems. All rights reserved.