Package org.jf.dexlib2.base.reference
Class BaseMethodProtoReference
- java.lang.Object
-
- org.jf.dexlib2.base.reference.BaseReference
-
- org.jf.dexlib2.base.reference.BaseMethodProtoReference
-
- All Implemented Interfaces:
java.lang.Comparable<MethodProtoReference>,MethodProtoReference,Reference
- Direct Known Subclasses:
BuilderMethodProtoReference,DexBackedMethodProtoReference,ImmutableMethodProtoReference,PoolMethodProto
public abstract class BaseMethodProtoReference extends BaseReference implements MethodProtoReference
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Constructor Summary
Constructors Constructor Description BaseMethodProtoReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(MethodProtoReference o)Compare this MethodProtoReference to another MethodProtoReference.booleanequals(java.lang.Object o)Compares this MethodProtoReference to another MethodProtoReference for equality.inthashCode()Returns a hashcode for this MethodProtoReference.java.lang.StringtoString()-
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.MethodProtoReference
getParameterTypes, getReturnType
-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
hashCode
public int hashCode()
Description copied from interface:MethodProtoReferenceReturns a hashcode for this MethodProtoReference. This hashCode is defined to be the following:int hashCode = getReturnType().hashCode(); hashCode = hashCode*31 + CharSequenceUtils.listHashCode(getParameters());- Specified by:
hashCodein interfaceMethodProtoReference- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code value for this ProtoReference
-
equals
public boolean equals(@Nullable java.lang.Object o)Description copied from interface:MethodProtoReferenceCompares this MethodProtoReference to another MethodProtoReference for equality. This MethodProtoReference is equal to another MethodProtoReference if all of it's "fields" are equal. That is, if the return values of getReturnType() and getParameterTypes() are all equal. Equality for getParameters() should be tested by comparing the string representation of each element. I.e. CharSequenceUtils.listEquals(this.getParameterTypes(), other.getParameterTypes())- Specified by:
equalsin interfaceMethodProtoReference- Overrides:
equalsin classjava.lang.Object- Parameters:
o- The object to be compared for equality with this MethodProtoReference- Returns:
- true if the specified object is equal to this MethodProtoReference
-
compareTo
public int compareTo(@Nonnull MethodProtoReference o)Description copied from interface:MethodProtoReferenceCompare this MethodProtoReference to another MethodProtoReference. The comparison is based on the comparison of the return values of getReturnType() and getParameters(), in that order. getParameters() should be compared using the semantics of org.jf.util.CollectionUtils.compareAsList()- Specified by:
compareToin interfacejava.lang.Comparable<MethodProtoReference>- Specified by:
compareToin interfaceMethodProtoReference- Parameters:
o- The MethodReference to compare with this MethodProtoReference- Returns:
- An integer representing the result of the comparison
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-