Package org.jf.dexlib2.iface.reference
Interface MethodProtoReference
-
- All Superinterfaces:
java.lang.Comparable<MethodProtoReference>
,Reference
- All Known Implementing Classes:
BaseMethodProtoReference
,BuilderMethodProtoReference
,DexBackedMethodProtoReference
,ImmutableMethodProtoReference
,PoolMethodProto
public interface MethodProtoReference extends Reference, java.lang.Comparable<MethodProtoReference>
This class represents a reference to a method prototype.
-
-
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 int
compareTo(MethodProtoReference o)
Compare this MethodProtoReference to another MethodProtoReference.boolean
equals(java.lang.Object o)
Compares this MethodProtoReference to another MethodProtoReference for equality.java.util.List<? extends java.lang.CharSequence>
getParameterTypes()
Gets a list of the types of the parameters of this method prototype.java.lang.String
getReturnType()
Gets the return type of the referenced method prototype.int
hashCode()
Returns a hashcode for this MethodProtoReference.-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
getParameterTypes
@Nonnull java.util.List<? extends java.lang.CharSequence> getParameterTypes()
Gets a list of the types of the parameters of this method prototype.- Returns:
- A list of the parameter types of this method prototype, as strings.
-
getReturnType
@Nonnull java.lang.String getReturnType()
Gets the return type of the referenced method prototype.- Returns:
- The return type of the referenced method prototype.
-
hashCode
int hashCode()
Returns a hashcode for this MethodProtoReference. This hashCode is defined to be the following:int hashCode = getReturnType().hashCode(); hashCode = hashCode*31 + CharSequenceUtils.listHashCode(getParameters());
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code value for this ProtoReference
-
equals
boolean equals(@Nullable java.lang.Object o)
Compares 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())- Overrides:
equals
in 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
int compareTo(@Nonnull MethodProtoReference o)
Compare 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:
compareTo
in interfacejava.lang.Comparable<MethodProtoReference>
- Parameters:
o
- The MethodReference to compare with this MethodProtoReference- Returns:
- An integer representing the result of the comparison
-
-