Package org.jf.dexlib2.base.reference
Class BaseFieldReference
- java.lang.Object
-
- org.jf.dexlib2.base.reference.BaseReference
-
- org.jf.dexlib2.base.reference.BaseFieldReference
-
- All Implemented Interfaces:
java.lang.Comparable<FieldReference>
,FieldReference
,Reference
- Direct Known Subclasses:
BuilderField
,BuilderFieldReference
,DexBackedField
,DexBackedFieldReference
,FieldReferenceRewriter.RewrittenFieldReference
,FieldRewriter.RewrittenField
,ImmutableField
,ImmutableFieldReference
,ReflectionField
public abstract class BaseFieldReference extends BaseReference implements FieldReference
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Constructor Summary
Constructors Constructor Description BaseFieldReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FieldReference o)
Compare this FieldReference to another FieldReference.boolean
equals(java.lang.Object o)
Compares this FieldReference to another FieldReference for equality.int
hashCode()
Returns a hashcode for this FieldReference.java.lang.String
toString()
-
Methods inherited from class org.jf.dexlib2.base.reference.BaseReference
validateReference
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jf.dexlib2.iface.reference.FieldReference
getDefiningClass, getName, getType
-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
hashCode
public int hashCode()
Description copied from interface:FieldReference
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();
- Specified by:
hashCode
in interfaceFieldReference
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code value for this FieldReference
-
equals
public boolean equals(@Nullable java.lang.Object o)
Description copied from interface:FieldReference
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.- Specified by:
equals
in interfaceFieldReference
- Overrides:
equals
in 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
public int compareTo(@Nonnull FieldReference o)
Description copied from interface:FieldReference
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:
compareTo
in interfacejava.lang.Comparable<FieldReference>
- Specified by:
compareTo
in interfaceFieldReference
- Parameters:
o
- The FieldReference to compare with this FieldReference- Returns:
- An integer representing the result of the comparison
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-