public abstract class AbstractMethod extends AccessibleObject
| Modifier and Type | Field and Description |
|---|---|
protected int |
accessFlags
Bits encoding access (e.g.
|
protected long |
artMethod
The ArtMethod associated with this Method, requried for dispatching due to entrypoints
Classloader is held live by the declaring class.
|
protected Class<?> |
declaringClass
Method's declaring class
|
protected Class<?> |
declaringClassOfOverriddenMethod
Overriden method's declaring class (same as declaringClass unless declaringClass
is a proxy class)
|
protected int |
dexMethodIndex
The method index of this method within its defining dex file
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMethod()
Hidden to workaround b/16828157.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareParameters(Class<?>[] params) |
protected boolean |
equalMethodParameters(Class<?>[] params) |
boolean |
equals(Object other)
Returns true if
other has the same declaring class, name,
parameters and return type as this method. |
int |
getAccessFlags() |
<T extends Annotation> |
getAnnotation(Class<T> annotationClass)
Returns, for this element, the annotation with the specified type, or
null if no annotation with the specified type is present
(including inherited annotations). |
Annotation[] |
getAnnotations()
Returns, for this element, an array containing all annotations (including
inherited annotations).
|
Annotation[] |
getDeclaredAnnotations()
Returns, for this element, all annotations that are explicitly declared
(not inherited).
|
int |
getDexMethodIndex()
Returns the index of this method's ID in its dex file.
|
abstract String |
getName()
Returns the name of the method or constructor represented by this
instance.
|
abstract Annotation[][] |
getParameterAnnotations()
Returns an array of arrays that represent the annotations of the formal
parameters of this method.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Indicates whether or not this element has an annotation with the
specified annotation type (including inherited annotations).
|
isAccessible, setAccessible, setAccessibleprotected int accessFlags
protected long artMethod
protected Class<?> declaringClass
protected Class<?> declaringClassOfOverriddenMethod
protected int dexMethodIndex
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
AnnotatedElementnull if no annotation with the specified type is present
(including inherited annotations).getAnnotation in interface AnnotatedElementgetAnnotation in class AccessibleObjectannotationClass - the type of the annotation to search fornullpublic final int getAccessFlags()
public final int getDexMethodIndex()
public abstract String getName()
public boolean equals(Object other)
other has the same declaring class, name,
parameters and return type as this method.equals in class Objectother - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public Annotation[] getDeclaredAnnotations()
AnnotatedElementgetDeclaredAnnotations in interface AnnotatedElementgetDeclaredAnnotations in class AccessibleObjectpublic boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
AnnotatedElementisAnnotationPresent in interface AnnotatedElementisAnnotationPresent in class AccessibleObjectannotationType - the type of the annotation to search fortrue if the annotation exists, false otherwisepublic Annotation[] getAnnotations()
AnnotatedElementgetAnnotations in interface AnnotatedElementgetAnnotations in class AccessibleObjectpublic abstract Annotation[][] getParameterAnnotations()
Annotation instancesprotected boolean equalMethodParameters(Class<?>[] params)
protected int compareParameters(Class<?>[] params)