- All Superinterfaces:
JavaMember
Represents a Java field declaration.
This interface is modeled on java.lang.reflect.Field.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.get
(JavaObject object) Get the contents of an Object fieldboolean
getBoolean
(JavaObject object) Get the contents of a boolean fieldbyte
getByte
(JavaObject object) Get the contents of a byte fieldchar
getChar
(JavaObject object) Get the contents of a char fielddouble
getDouble
(JavaObject object) Get the contents of a double fieldfloat
getFloat
(JavaObject object) Get the contents of a float fieldint
getInt
(JavaObject object) Get the contents of an int fieldlong
getLong
(JavaObject object) Get the contents of a long fieldshort
getShort
(JavaObject object) Get the contents of a short fieldgetString
(JavaObject object) Get the contents of a string fielddefault boolean
Deprecated.default boolean
Deprecated.Methods declared in interface com.ibm.dtfj.java.JavaMember
getDeclaringClass, getModifiers, getName, getSignature, hashCode
-
Method Details
-
get
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:
CorruptDataException
MemoryAccessException
NullPointerException
- if the field is an instance field, and object is nullIllegalArgumentException
- if the specified object is not appropriate for this field- See Also:
-
getBoolean
Get the contents of a boolean field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of a byte field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of a char field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of a double field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of a float field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of an int field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of a long field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
Get the contents of a short field- Parameters:
object
- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataException
MemoryAccessException
NullPointerException
- 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
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:
CorruptDataException
MemoryAccessException
IllegalArgumentException
- if the specified field is not a StringNullPointerException
- if the field is an instance field, and object is null
-
equals
Description copied from class:Object
Compares 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:
equals
in interfaceJavaMember
- Overrides:
equals
in classObject
- Parameters:
obj
-- Returns:
- True if the given object refers to the same Java Field in the image
- See Also:
-
isNestedPacked
Deprecated. -
isNestedPackedArray
@Deprecated default boolean isNestedPackedArray() throws CorruptDataException, MemoryAccessExceptionDeprecated.
-