Package org.jf.dexlib2.base
Class BaseAnnotationElement
java.lang.Object
org.jf.dexlib2.base.BaseAnnotationElement
- All Implemented Interfaces:
Comparable<AnnotationElement>,AnnotationElement
- Direct Known Subclasses:
AnnotationElementRewriter.RewrittenAnnotationElement,BuilderAnnotationElement,DexBackedAnnotationElement,ImmutableAnnotationElement
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares this AnnotationElement to another AnnotationElement.booleanCompares this AnnotationElement to another AnnotationElement for equality.inthashCode()Returns a hashcode for this AnnotationElement.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jf.dexlib2.iface.AnnotationElement
getName, getValue
-
Field Details
-
BY_NAME
-
-
Constructor Details
-
BaseAnnotationElement
public BaseAnnotationElement()
-
-
Method Details
-
hashCode
public int hashCode()Description copied from interface:AnnotationElementReturns a hashcode for this AnnotationElement. This hashCode is defined to be the following:int hashCode = getName().hashCode(); hashCode = hashCode*31 + getValue().hashCode();- Specified by:
hashCodein interfaceAnnotationElement- Overrides:
hashCodein classObject- Returns:
- The hash code value for this AnnotationElement
-
equals
Description copied from interface:AnnotationElementCompares this AnnotationElement to another AnnotationElement for equality. This AnnotationElement is equal to another AnnotationElement if all of it's "fields" are equal. That is, if the return values of getName() and getValue() are both equal.- Specified by:
equalsin interfaceAnnotationElement- Overrides:
equalsin classObject- Parameters:
o- The object to be compared for equality with this AnnotationElement- Returns:
- true if the specified object is equal to this AnnotationElement
-
compareTo
Description copied from interface:AnnotationElementCompares this AnnotationElement to another AnnotationElement. The comparison is based on the value of getName() and getValue(), in that order.- Specified by:
compareToin interfaceAnnotationElement- Specified by:
compareToin interfaceComparable<AnnotationElement>- Parameters:
o- The AnnotationElement to compare with this AnnotationElement- Returns:
- An integer representing the result of the comparison
-