-
- All Superinterfaces:
JavaMember
public interface JavaField extends JavaMember
Represents a Java field declaration.
This interface is modeled on java.lang.reflect.Field.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.Objectget(JavaObject object)Get the contents of an Object fieldbooleangetBoolean(JavaObject object)Get the contents of a boolean fieldbytegetByte(JavaObject object)Get the contents of a byte fieldchargetChar(JavaObject object)Get the contents of a char fielddoublegetDouble(JavaObject object)Get the contents of a double fieldfloatgetFloat(JavaObject object)Get the contents of a float fieldintgetInt(JavaObject object)Get the contents of an int fieldlonggetLong(JavaObject object)Get the contents of a long fieldshortgetShort(JavaObject object)Get the contents of a short fieldStringgetString(JavaObject object)Get the contents of a string fielddefault booleanisNestedPacked()Deprecated.default booleanisNestedPackedArray()Deprecated.-
Methods declared in interface com.ibm.dtfj.java.JavaMember
getDeclaringClass, getModifiers, getName, getSignature, hashCode
-
-
-
-
Method Detail
-
get
Object get(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of an Object field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- a JavaObject instance for reference type fields,
an instance of a subclass of Number, Boolean, or Character
for primitive fields, or null for null reference fields.
This field must be declared in the object's class or in a superclass
- Throws:
CorruptDataExceptionMemoryAccessExceptionNullPointerException- if the field is an instance field, and object is nullIllegalArgumentException- if the specified object is not appropriate for this field- See Also:
JavaObject,Byte,Double,Float,Integer,Long,Short,Character,Boolean
-
getBoolean
boolean getBoolean(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a boolean field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 boolean
-
getByte
byte getByte(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a byte field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 byte
-
getChar
char getChar(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a char field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 char
-
getDouble
double getDouble(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a double field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 double
-
getFloat
float getFloat(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a float field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 float
-
getInt
int getInt(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of an int field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 int
-
getLong
long getLong(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a long field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 long
-
getShort
short getShort(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a short field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
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 short
-
getString
String getString(JavaObject object) throws CorruptDataException, MemoryAccessException
Get the contents of a string field- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- a String representing the value of the String field. Note that the instance returned can be null if the field was null in object.
- Throws:
CorruptDataExceptionMemoryAccessExceptionIllegalArgumentException- if the specified field is not a StringNullPointerException- if the field is an instance field, and object is null
-
equals
boolean equals(Object obj)
Description copied from class:ObjectCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. The implementation in Object answers true only if the argument is the exact same object as the receiver (==).- Specified by:
equalsin interfaceJavaMember- Overrides:
equalsin classObject- Parameters:
obj-- Returns:
- True if the given object refers to the same Java Field in the image
- See Also:
Object.hashCode()
-
isNestedPacked
@Deprecated default boolean isNestedPacked() throws CorruptDataException, MemoryAccessException
Deprecated.
-
isNestedPackedArray
@Deprecated default boolean isNestedPackedArray() throws CorruptDataException, MemoryAccessException
Deprecated.
-
-