edu.rit.classfile
Class FieldReference

java.lang.Object
  extended by edu.rit.classfile.FieldReference
Direct Known Subclasses:
FieldDescription, NamedFieldReference

public abstract class FieldReference
extends Object

Class FieldReference encapsulates the information needed to refer to a field. This includes the field's class, name, and type. In the documentation below, the term "referenced field" means "the field referred to by this field reference object."


Method Summary
 boolean equals(Object obj)
          Determine if this field reference is equal to the given object.
 ClassReference getClassReference()
          Returns the class which contains the referenced field.
 String getFieldDescriptor()
          Returns the referenced field's descriptor.
 String getFieldName()
          Returns the referenced field's name.
 TypeReference getFieldType()
          Returns the referenced field's type.
 int hashCode()
          Returns a hash code for this field reference.
 String toString()
          Returns a string version of this field reference.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getClassReference

public ClassReference getClassReference()
Returns the class which contains the referenced field.


getFieldName

public String getFieldName()
Returns the referenced field's name.


getFieldDescriptor

public String getFieldDescriptor()
Returns the referenced field's descriptor.


getFieldType

public TypeReference getFieldType()
Returns the referenced field's type.


equals

public boolean equals(Object obj)
Determine if this field reference is equal to the given object. To be equal, the given object must be a non-null instance of class FieldReference, with the same class reference, field name, and field descriptor as this field reference.

Overrides:
equals in class Object
Parameters:
obj - Object to test.
Returns:
True if this field reference is equal to the given object, false otherwise.

hashCode

public int hashCode()
Returns a hash code for this field reference.

Overrides:
hashCode in class Object

toString

public String toString()
Returns a string version of this field reference. This is the field type, followed by the fully qualified name of the field.

Overrides:
toString in class Object


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.