public final class IntFieldInfo extends VanillaFieldInfo
bracketType, name, type| Constructor and Description |
|---|
IntFieldInfo(String name,
Class type,
BracketType bracketType,
@NotNull Field field) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(Object source,
Object destination)
Copy the field from the source object to the destination
|
int |
getInt(Object object)
Returns the value of the field represented by this
FieldInfo object
as an int primitive. |
protected long |
getOffset() |
boolean |
isEqual(Object a,
Object b) |
void |
set(Object object,
int value)
Sets the value of the field represented by this
FieldInfo object
to the provided value. |
genericType, get, getChar, getDouble, getField, getLong, lookupClass, set, set, set, setbracketType, equals, hashCode, name, toString, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitbracketType, createForField, name, typepublic IntFieldInfo(String name, Class type, BracketType bracketType, @NotNull @NotNull Field field)
public int getInt(Object object)
FieldInfoFieldInfo object
as an int primitive. The provided object is used as a target
to extract the field from.getInt in interface FieldInfogetInt in class VanillaFieldInfoFieldInfo object
as an int primitive.public void set(Object object, int value) throws IllegalArgumentException
FieldInfoFieldInfo object
to the provided value. The provided object is used as a
target to the extract eh field from.set in interface FieldInfoset in class VanillaFieldInfoIllegalArgumentExceptionpublic boolean isEqual(Object a, Object b)
isEqual in interface FieldInfoisEqual in class VanillaFieldInfopublic void copy(Object source, Object destination)
FieldInfoNote: this is not a deep copy, objects will be copied by reference
source - The object to copy the field value fromdestination - The object to copy the field value toprotected long getOffset()
throws NoSuchFieldException
NoSuchFieldExceptionCopyright © 2023. All rights reserved.