com.ibm.dtfj.java

Interface JavaField

All Superinterfaces:
JavaMember

  1. public interface JavaField
  2. extends JavaMember

Represents a Java field declaration.

This interface is modelled on java.lang.reflect.Field.


Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object obj)
  1. java.lang.Object
get(JavaObject object)
Get the contents of an Object field
  1. boolean
getBoolean(JavaObject object)
Get the contents of a boolean field
  1. byte
getByte(JavaObject object)
Get the contents of a byte field
  1. char
getChar(JavaObject object)
Get the contents of a char field
  1. double
getDouble(JavaObject object)
Get the contents of a double field
  1. float
getFloat(JavaObject object)
Get the contents of a float field
  1. int
getInt(JavaObject object)
Get the contents of an int field
  1. long
getLong(JavaObject object)
Get the contents of a long field
  1. short
getShort(JavaObject object)
Get the contents of a short field
  1. java.lang.String
getString(JavaObject object)
Get the contents of a string field
  1. int
hashCode()
Methods inherited from interface com.ibm.dtfj.java.JavaMember
getDeclaringClass, getModifiers, getName, getSignature

Method Detail

get

  1. java.lang.Object get(JavaObject object)
  2. throws CorruptDataException
  3. 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:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field
See Also:
JavaObject, Byte, Double, Float, Integer, Long, Short, Character, Boolean

getBoolean

  1. boolean getBoolean(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a boolean field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to boolean

getByte

  1. byte getByte(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a byte field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to byte

getChar

  1. char getChar(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a char field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to char

getDouble

  1. double getDouble(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a double field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to double

getFloat

  1. float getFloat(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a float field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to float

getInt

  1. int getInt(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of an int field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to int

getLong

  1. long getLong(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a long field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to long

getShort

  1. short getShort(JavaObject object)
  2. throws CorruptDataException
  3. MemoryAccessException
Get the contents of a short field
Parameters:
object - to fetch the field from. Ignored for static fields.
Returns:
the field contents
Throws:
java.lang.NullPointerException - if the field is an instance field, and object is null
java.lang.IllegalArgumentException - if the specified object is not appropriate for this field, or if the type of the field cannot be converted to short

getString

  1. java.lang.String getString(JavaObject object)
  2. throws CorruptDataException
  3. 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:
java.lang.IllegalArgumentException - if the specified field is not a String
java.lang.NullPointerException - if the field is an instance field, and object is null

equals

  1. boolean equals(java.lang.Object obj)
Specified by:
equals in interface JavaMember
Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
True if the given object refers to the same Java Field in the image

hashCode

  1. int hashCode()
Specified by:
hashCode in interface JavaMember
Overrides:
hashCode in class java.lang.Object