Package com.tonic.analysis.xref
Class FieldReference
- java.lang.Object
-
- com.tonic.analysis.xref.FieldReference
-
public class FieldReference extends Object
Identifies a specific field by owner class, name, and descriptor.
-
-
Constructor Summary
Constructors Constructor Description FieldReference(String owner, String name, String descriptor)Creates a field reference, substituting the empty string for any null component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetDescriptor()StringgetDisplayName()Renders the reference with a dotted class name and no descriptor.StringgetFullReference()Renders the reference with the internal owner name and the descriptor.StringgetName()StringgetOwner()inthashCode()StringtoString()
-
-
-
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 nullname- the field name, may be nulldescriptor- 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"
-
-