Class FieldReference


  • public class FieldReference
    extends Object
    Identifies a specific field by owner class, name, and descriptor.
    • Constructor Detail

      • FieldReference

        public FieldReference​(String owner,
                              String name,
                              String descriptor)
        Creates a field reference, substituting the empty string for any null component.
        Parameters:
        owner - internal name of the declaring class, may be null
        name - the field name, may be null
        descriptor - the field type descriptor, may be null
    • Method Detail

      • getOwner

        public String getOwner()
        Returns:
        the owner
      • getName

        public String getName()
        Returns:
        the name
      • getDescriptor

        public String getDescriptor()
        Returns:
        the descriptor
      • getDisplayName

        public String getDisplayName()
        Renders the reference with a dotted class name and no descriptor.
        Returns:
        a string of the form "com.example.MyClass.fieldName"
      • getFullReference

        public String getFullReference()
        Renders the reference with the internal owner name and the descriptor.
        Returns:
        a string of the form "owner.name:descriptor"
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object