Package org.jf.dexlib2.iface.reference
Interface FieldReference
-
- All Superinterfaces:
java.lang.Comparable<FieldReference>,Reference
- All Known Subinterfaces:
Field
- All Known Implementing Classes:
BaseFieldReference,BuilderField,BuilderFieldReference,DexBackedField,DexBackedFieldReference,FieldReferenceRewriter.RewrittenFieldReference,FieldRewriter.RewrittenField,ImmutableField,ImmutableFieldReference,ReflectionField
public interface FieldReference extends Reference, java.lang.Comparable<FieldReference>
This class represents a reference to a field.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcompareTo(FieldReference o)Compare this FieldReference to another FieldReference.booleanequals(java.lang.Object o)Compares this FieldReference to another FieldReference for equality.java.lang.StringgetDefiningClass()Gets the type of the class that defines the referenced field.java.lang.StringgetName()Gets the name of the referenced field.java.lang.StringgetType()Gets the type of the referenced field.inthashCode()Returns a hashcode for this FieldReference.-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
getDefiningClass
@Nonnull java.lang.String getDefiningClass()
Gets the type of the class that defines the referenced field.- Returns:
- The type of the class that defines the referenced field
-
getName
@Nonnull java.lang.String getName()
Gets the name of the referenced field.- Returns:
- The name of the referenced field
-
getType
@Nonnull java.lang.String getType()
Gets the type of the referenced field.- Returns:
- The type of the referenced field
-
hashCode
int hashCode()
Returns a hashcode for this FieldReference. This hashCode is defined to be the following:int hashCode = getDefiningClass().hashCode(); hashCode = hashCode*31 + getName().hashCode(); hashCode = hashCode*31 + getType().hashCode();- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code value for this FieldReference
-
equals
boolean equals(@Nullable java.lang.Object o)Compares this FieldReference to another FieldReference for equality. This FieldReference is equal to another FieldReference if all of it's "fields" are equal. That is, if the return values of getDefiningClass(), getName() and getType() are all equal.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- The object to be compared for equality with this FieldReference- Returns:
- true if the specified object is equal to this FieldReference
-
compareTo
int compareTo(@Nonnull FieldReference o)Compare this FieldReference to another FieldReference. The comparison is based on the comparison of the return values of getDefiningClass(), getName() and getType(), in that order.- Specified by:
compareToin interfacejava.lang.Comparable<FieldReference>- Parameters:
o- The FieldReference to compare with this FieldReference- Returns:
- An integer representing the result of the comparison
-
-