public final class ObjectFieldInfo extends VanillaFieldInfo
bracketType, name, type| Constructor and Description |
|---|
ObjectFieldInfo(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
|
@Nullable Object |
get(Object object)
Returns the value of the field represented by this
FieldInfo object
as an Object. |
protected long |
getOffset() |
boolean |
isEqual(Object a,
Object b) |
void |
set(Object object,
Object value)
Sets the value of the field represented by this
FieldInfo object
to the provided value. |
genericType, getChar, getDouble, getField, getInt, getLong, lookupClass, set, set, set, setbracketType, equals, hashCode, name, toString, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitbracketType, createForField, name, typepublic ObjectFieldInfo(String name, Class<?> type, BracketType bracketType, @NotNull @NotNull Field field)
@Nullable public @Nullable Object get(Object object)
FieldInfoFieldInfo object
as an Object. The provided object is used as a target to
extract the field from.get in interface FieldInfoget in class VanillaFieldInfoFieldInfo object
as an Object.public void set(Object object, Object 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.