- 
- All Superinterfaces:
- Accessible,- Comparable<Field>,- Mirror,- TypeComponent
 
 public interface Field extends TypeComponent, Comparable<Field> A class or instance variable in the target VM. SeeTypeComponentfor general information about Field and Method mirrors.- Since:
- 1.3
- See Also:
- ObjectReference,- ReferenceType
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(Object obj)Compares the specified Object with this field for equality.inthashCode()Returns the hash code value for this Field.booleanisEnumConstant()Determine if this is a field that represents an enum constant.booleanisTransient()Determine if this is a transient field.booleanisVolatile()Determine if this is a volatile field.Typetype()Returns the type of this field.StringtypeName()Returns a text representation of the type of this field.- 
Methods declared in interface com.sun.jdi.AccessibleisPackagePrivate, isPrivate, isProtected, isPublic, modifiers
 - 
Methods declared in interface java.lang.ComparablecompareTo
 - 
Methods declared in interface com.sun.jdi.MirrortoString, virtualMachine
 - 
Methods declared in interface com.sun.jdi.TypeComponentdeclaringType, genericSignature, isFinal, isStatic, isSynthetic, name, signature
 
- 
 
- 
- 
- 
Method Detail- 
typeNameString typeName() Returns a text representation of the type of this field. Where the type is the type specified in the declaration of this field.This type name is always available even if the type has not yet been created or loaded. - Returns:
- a String representing the type of this field.
 
 - 
typeType type() throws ClassNotLoadedException Returns the type of this field. Where the type is the type specified in the declaration of this field.For example, if a target class defines: short s; Date d; byte[] ba;And the JDI client defines theseFieldobjects:Field sField = targetClass.fieldByName("s"); Field dField = targetClass.fieldByName("d"); Field baField = targetClass.fieldByName("ba");to mirror the corresponding fields, thensField.type()is aShortType,dField.type()is theReferenceTypeforjava.util.Dateand((ArrayType)(baField.type())).componentType()is aByteType.Note: if the type of this field is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, declaringType().classLoader(), then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g.fields()) will throw aClassNotPreparedException. UseReferenceType.isPrepared()to determine if a reference type is prepared.- Returns:
- the Typeof this field.
- Throws:
- ClassNotLoadedException- if the type has not yet been loaded or created through the appropriate class loader.
- See Also:
- Type
 
 - 
isTransientboolean isTransient() Determine if this is a transient field.- Returns:
- trueif this field is transient;- falseotherwise.
 
 - 
isVolatileboolean isVolatile() Determine if this is a volatile field.- Returns:
- trueif this field is volatile;- falseotherwise.
 
 - 
isEnumConstantboolean isEnumConstant() Determine if this is a field that represents an enum constant.- Returns:
- trueif this field represents an enum constant;- falseotherwise.
 
 - 
equalsboolean equals(Object obj) Compares the specified Object with this field for equality.- Overrides:
- equalsin class- Object
- Parameters:
- obj- the reference object with which to compare.
- Returns:
- trueif the Object is a Field and if both mirror the same field (declared in the same class or interface, in the same VM).
- See Also:
- Object.hashCode(),- HashMap
 
 - 
hashCodeint hashCode() Returns the hash code value for this Field.- Overrides:
- hashCodein class- Object
- Returns:
- the integer hash code.
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
 
- 
 
-