Package org.jf.dexlib2.base.reference
Class BaseMethodReference
java.lang.Object
org.jf.dexlib2.base.reference.BaseReference
org.jf.dexlib2.base.reference.BaseMethodReference
- All Implemented Interfaces:
Comparable<MethodReference>,MethodReference,Reference
- Direct Known Subclasses:
BuilderMethod,BuilderMethodPool.MethodKey,BuilderMethodReference,ClassProto.ReparentedMethod,DexBackedMethod,DexBackedMethodReference,ImmutableMethod,ImmutableMethodReference,MethodAnalyzer.ReparentedMethodReference,MethodReferenceRewriter.RewrittenMethodReference,MethodRewriter.RewrittenMethod,PoolMethod,ReflectionConstructor,ReflectionMethod
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jf.dexlib2.base.reference.BaseReference
validateReferenceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jf.dexlib2.iface.reference.MethodReference
getDefiningClass, getName, getParameterTypes, getReturnTypeMethods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
Constructor Details
-
BaseMethodReference
public BaseMethodReference()
-
-
Method Details
-
hashCode
public int hashCode()Description copied from interface:MethodReferenceReturns a hashcode for this MethodReference. This hashCode is defined to be the following:int hashCode = getDefiningClass().hashCode(); hashCode = hashCode*31 + getName().hashCode(); hashCode = hashCode*31 + getReturnType().hashCode(); hashCode = hashCode*31 + CharSequenceUtils.listHashCode(getParameters());- Specified by:
hashCodein interfaceMethodReference- Overrides:
hashCodein classObject- Returns:
- The hash code value for this MethodReference
-
equals
Description copied from interface:MethodReferenceCompares this MethodReference to another MethodReference for equality. This MethodReference is equal to another MethodReference if all of it's "fields" are equal. That is, if the return values of getDefiningClass(), getName(), 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 interfaceMethodReference- Overrides:
equalsin classObject- Parameters:
o- The object to be compared for equality with this MethodReference- Returns:
- true if the specified object is equal to this MethodReference
-
compareTo
Description copied from interface:MethodReferenceCompare this MethodReference to another MethodReference. The comparison is based on the comparison of the return values of getDefiningClass(), getName(), getReturnType() and getParameters(), in that order. getParameters() should be compared using the semantics of org.jf.util.CollectionUtils.compareAsList()- Specified by:
compareToin interfaceComparable<MethodReference>- Specified by:
compareToin interfaceMethodReference- Parameters:
o- The MethodReference to compare with this MethodReference- Returns:
- An integer representing the result of the comparison
-
toString
-