java.lang.Object
com.ibm.dtfj.java.j9.JavaField
- All Implemented Interfaces:
JavaField,JavaMember
- Direct Known Subclasses:
JavaInstanceField,JavaStaticField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JavaRuntimeprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaField(JavaRuntime vm, String name, String signature, int modifiers, long declaringClassID) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares 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 field.Get the class which declares this field or methoddoublegetDouble(JavaObject object) Get the contents of a double field.floatgetFloat(JavaObject object) Get the contents of a float field.intgetInt(JavaObject object) Get the contents of an int field.longgetLong(JavaObject object) Get the contents of a long field.intGet the set of modifiers for this field or method - a set of bitsgetName()Get the name of the field or methodprotected abstract ObjectgetReferenceType(JavaObject object) shortgetShort(JavaObject object) Get the contents of a short field.Get the signature of the field or methodgetString(JavaObject hostObject) Get the contents of a string field.inthashCode()Answers an integer hash code for the receiver.Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface com.ibm.dtfj.java.JavaField
getBoolean, getByte, getChar, isNestedPacked, isNestedPackedArray
-
Field Details
-
BOOLEAN_SIGNATURE
- See Also:
-
BYTE_SIGNATURE
- See Also:
-
CHAR_SIGNATURE
- See Also:
-
SHORT_SIGNATURE
- See Also:
-
INTEGER_SIGNATURE
- See Also:
-
LONG_SIGNATURE
- See Also:
-
FLOAT_SIGNATURE
- See Also:
-
DOUBLE_SIGNATURE
- See Also:
-
OBJECT_PREFIX_SIGNATURE
- See Also:
-
ARRAY_PREFIX_SIGNATURE
- See Also:
-
_javaVM
-
-
Constructor Details
-
JavaField
protected JavaField(JavaRuntime vm, String name, String signature, int modifiers, long declaringClassID)
-
-
Method Details
-
get
Description copied from interface:JavaFieldGet the contents of an Object field.- Specified by:
getin interfaceJavaField- 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:
CorruptDataExceptionMemoryAccessException- See Also:
-
getLong
Description copied from interface:JavaFieldGet the contents of a long field.- Specified by:
getLongin interfaceJavaField- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataExceptionMemoryAccessException
-
getDouble
Description copied from interface:JavaFieldGet the contents of a double field.- Specified by:
getDoublein interfaceJavaField- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataExceptionMemoryAccessException
-
getFloat
Description copied from interface:JavaFieldGet the contents of a float field.- Specified by:
getFloatin interfaceJavaField- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataExceptionMemoryAccessException
-
getInt
Description copied from interface:JavaFieldGet the contents of an int field.- Specified by:
getIntin interfaceJavaField- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataExceptionMemoryAccessException
-
getShort
Description copied from interface:JavaFieldGet the contents of a short field.- Specified by:
getShortin interfaceJavaField- Parameters:
object- to fetch the field from. Ignored for static fields.- Returns:
- the field contents
- Throws:
CorruptDataExceptionMemoryAccessException
-
getReferenceType
protected abstract Object getReferenceType(JavaObject object) throws CorruptDataException, MemoryAccessException -
getModifiers
Description copied from interface:JavaMemberGet the set of modifiers for this field or method - a set of bits- Specified by:
getModifiersin interfaceJavaMember- Returns:
- the modifiers for this field or method. The values for the constants representing the modifiers can be obtained from java.lang.reflect.Modifier.
- Throws:
CorruptDataException
-
getDeclaringClass
Description copied from interface:JavaMemberGet the class which declares this field or method- Specified by:
getDeclaringClassin interfaceJavaMember- Returns:
- the JavaClass which declared this field or method
- Throws:
CorruptDataException
-
getName
Description copied from interface:JavaMemberGet the name of the field or method- Specified by:
getNamein interfaceJavaMember- Returns:
- the name of the field or method
- Throws:
CorruptDataException
-
getSignature
Description copied from interface:JavaMemberGet the signature of the field or method- Specified by:
getSignaturein interfaceJavaMember- Returns:
- the signature of the field or method. e.g. "(Ljava/lang/String;)V"
- Throws:
CorruptDataException
-
getString
Description copied from interface:JavaFieldGet the contents of a string field.- Specified by:
getStringin interfaceJavaField- Parameters:
hostObject- 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:
CorruptDataExceptionMemoryAccessException
-
equals
Description copied from class:java.lang.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- Object the object to compare with this object.- Returns:
- boolean
trueif the object is the same as this objectfalseif it is different from this object. - See Also:
-
hashCode
public int hashCode()Description copied from class:java.lang.ObjectAnswers an integer hash code for the receiver. Any two objects which answertruewhen passed to.equalsmust answer the same value for this method.- Specified by:
hashCodein interfaceJavaMember- Overrides:
hashCodein classObject- Returns:
- the receiver's hash.
- See Also:
-