| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | SerializableField.RecordComponent
A record component, which has a name, type and index. |
| Modifier and Type | Field and Description |
|---|---|
| private final Field | |
| private final long | |
| private final Kind | |
| private final String | |
| private final int | |
| private final Class | |
| pack-priv static final Unsafe | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv | SerializableField(Class<?> type, String name, boolean unshared, final Field field, SerializableField.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: the value of the fieldthe object instance (must not be instance)null, must be of the correct type)Get the boolean value of this field on the given object instance. |
| public byte | |
| public char | |
| public double | |
| public Field | Returns: the reflection field
Deprecated
As of Java 9, accessible fields are generally disallowed; use the
Get the reflection #setXXX(Object,value) methods instead.
Field for this serializable field.
|
| public float | |
| public int | |
| public Kind | |
| public long | |
| public String | |
| public Object | |
| public int | Returns: The record component index or -1Getter for the record component index. |
| public Object | Returns: The record component value for this objThe object to obtain the record component value obj)Getter for the record component value. |
| public short | |
| public Class | |
| public boolean | Returns: true if this object may be used to get or set an object field value, false otherwiseDetermine if this object may be used to get or set an object field value. |
| public boolean | Returns: true if the field is unsharedDetermine whether this field is marked as "unshared". |
| public void | readFrom(Object
the instance instance, ObjectInput the source stream input)Read the field value from the stream. |
| public void | setBoolean(Object
the object instance (must not be instance, boolean null, must be of the correct type)the value to set value)Set the boolean value of this field on the given object instance. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| field | back to summary |
|---|---|
| private final Field field | |
| fieldOffset | back to summary |
|---|---|
| private final long fieldOffset | |
| kind | back to summary |
|---|---|
| private final Kind kind | |
| name | back to summary |
|---|---|
| private final String name | |
| recordComponentIndex | back to summary |
|---|---|
| private final int recordComponentIndex | |
| type | back to summary |
|---|---|
| private final Class<?> type | |
| unsafe | back to summary |
|---|---|
| pack-priv static final Unsafe unsafe | |
| unshared | back to summary |
|---|---|
| private final boolean unshared | |
| SerializableField | back to summary |
|---|---|
| public SerializableField(Class<?> type, String name, boolean unshared) | |
| SerializableField | back to summary |
|---|---|
| pack-priv SerializableField(Class<?> type, String name, boolean unshared, final Field field, SerializableField. | |
| getBoolean | back to summary |
|---|---|
| public boolean getBoolean(Object instance) throws ClassCastException, IllegalArgumentException Get the boolean value of this field on the given object instance.
| |
| getByte | back to summary |
|---|---|
| public byte getByte(Object instance) throws ClassCastException, IllegalArgumentException Get the byte value of this field on the given object instance.
| |
| getChar | back to summary |
|---|---|
| public char getChar(Object instance) throws ClassCastException, IllegalArgumentException Get the char value of this field on the given object instance.
| |
| getDouble | back to summary |
|---|---|
| public double getDouble(Object instance) throws ClassCastException, IllegalArgumentException Get the double value of this field on the given object instance.
| |
| getField | back to summary |
|---|---|
| public Field getField()
Deprecated As of Java 9, accessible fields are generally disallowed; use the Get the reflection
| |
| getFloat | back to summary |
|---|---|
| public float getFloat(Object instance) throws ClassCastException, IllegalArgumentException Get the float value of this field on the given object instance.
| |
| getInt | back to summary |
|---|---|
| public int getInt(Object instance) throws ClassCastException, IllegalArgumentException Get the integer value of this field on the given object instance.
| |
| getKind | back to summary |
|---|---|
| public Kind getKind() Get the kind of field.
| |
| getLong | back to summary |
|---|---|
| public long getLong(Object instance) throws ClassCastException, IllegalArgumentException Get the long value of this field on the given object instance.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the name of the field.
| |
| getObject | back to summary |
|---|---|
| public Object getObject(Object instance) throws ClassCastException, IllegalArgumentException Get the object value of this field on the given object instance.
| |
| getRecordComponentIndex | back to summary |
|---|---|
| public int getRecordComponentIndex() Getter for the record component index.
| |
| getRecordComponentValue | back to summary |
|---|---|
| public Object getRecordComponentValue(Object obj) Getter for the record component value. | |
| getShort | back to summary |
|---|---|
| public short getShort(Object instance) throws ClassCastException, IllegalArgumentException Get the short value of this field on the given object instance.
| |
| getType | back to summary |
|---|---|
| public Class Get the field type.
| |
| isAccessible | back to summary |
|---|---|
| public boolean isAccessible() Determine if this object may be used to get or set an object field value.
| |
| isUnshared | back to summary |
|---|---|
| public boolean isUnshared() Determine whether this field is marked as "unshared".
| |
| readFrom | back to summary |
|---|---|
| public void readFrom(Object instance, ObjectInput input) throws IOException, ClassNotFoundException Read the field value from the stream.
| |
| setBoolean | back to summary |
|---|---|
| public void setBoolean(Object instance, boolean value) throws ClassCastException, IllegalArgumentException Set the boolean value of this field on the given object instance.
| |
| setByte | back to summary |
|---|---|
| public void setByte(Object instance, byte value) throws ClassCastException, IllegalArgumentException Set the byte value of this field on the given object instance.
| |
| setChar | back to summary |
|---|---|
| public void setChar(Object instance, char value) throws ClassCastException, IllegalArgumentException Set the char value of this field on the given object instance.
| |
| setDouble | back to summary |
|---|---|
| public void setDouble(Object instance, double value) throws ClassCastException, IllegalArgumentException Set the double value of this field on the given object instance.
| |
| setFloat | back to summary |
|---|---|
| public void setFloat(Object instance, float value) throws ClassCastException, IllegalArgumentException Set the float value of this field on the given object instance.
| |
| setInt | back to summary |
|---|---|
| public void setInt(Object instance, int value) throws ClassCastException, IllegalArgumentException Set the integer value of this field on the given object instance.
| |
| setLong | back to summary |
|---|---|
| public void setLong(Object instance, long value) throws ClassCastException, IllegalArgumentException Set the long value of this field on the given object instance.
| |
| setObject | back to summary |
|---|---|
| public void setObject(Object instance, Object value) throws ClassCastException, IllegalArgumentException Set the object value of this field on the given object instance.
| |
| setShort | back to summary |
|---|---|
| public void setShort(Object instance, short value) throws ClassCastException, IllegalArgumentException Set the short value of this field on the given object instance.
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(Object instance, ObjectOutput output) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| index | back to summary |
|---|---|
| private final int index | |
| name | back to summary |
|---|---|
| private final String name | |
| type | back to summary |
|---|---|
| private final Class<?> type | |
| RecordComponent | back to summary |
|---|---|
| pack-priv RecordComponent(String name, Class<?> type, int index) | |
| getIndex | back to summary |
|---|---|
| public int getIndex() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getType | back to summary |
|---|---|
| public Class | |