public interface JavaField extends JavaMember
Represents a Java field declaration.
This interface is modeled on java.lang.reflect.Field.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares the argument to the receiver, and answers true
if they represent the same object using a class
specific comparison.
|
Object |
get(JavaObject object)
Get the contents of an Object field.
|
boolean |
getBoolean(JavaObject object)
Get the contents of a boolean field.
|
byte |
getByte(JavaObject object)
Get the contents of a byte field.
|
char |
getChar(JavaObject object)
Get the contents of a char field.
|
double |
getDouble(JavaObject object)
Get the contents of a double field.
|
float |
getFloat(JavaObject object)
Get the contents of a float field.
|
int |
getInt(JavaObject object)
Get the contents of an int field.
|
long |
getLong(JavaObject object)
Get the contents of a long field.
|
short |
getShort(JavaObject object)
Get the contents of a short field.
|
String |
getString(JavaObject object)
Get the contents of a string field.
|
int |
hashCode()
Answers an integer hash code for the receiver.
|
default boolean |
isNestedPacked()
Deprecated.
|
default boolean |
isNestedPackedArray()
Deprecated.
|
getDeclaringClass, getModifiers, getName, getSignatureObject get(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this fieldJavaObject,
Byte,
Double,
Float,
Integer,
Long,
Short,
Character,
Booleanboolean getBoolean(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to booleanbyte getByte(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fieldsCorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to bytechar getChar(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to chardouble getDouble(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to doublefloat getFloat(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to floatint getInt(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to intlong getLong(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to longshort getShort(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionNullPointerException - if the field is an instance field, and object is nullIllegalArgumentException - if the specified object is not appropriate for
this field, or if the type of the field cannot be converted to shortString getString(JavaObject object) throws CorruptDataException, MemoryAccessException
object - to fetch the field from. Ignored for static fields.CorruptDataExceptionMemoryAccessExceptionIllegalArgumentException - if the specified field is not a StringNullPointerException - if the field is an instance field, and object is nullboolean equals(Object obj)
equals in interface JavaMemberequals in class Objectobj - Object
the object to compare with this object.true
if the object is the same as this object
false
if it is different from this object.Object.hashCode()int hashCode()
true when passed to
.equals must answer the same value for this
method.hashCode in interface JavaMemberhashCode in class ObjectObject.equals(java.lang.Object)@Deprecated default boolean isNestedPacked() throws CorruptDataException, MemoryAccessException
@Deprecated default boolean isNestedPackedArray() throws CorruptDataException, MemoryAccessException
Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2004, 2025 IBM Corp. and others.