com.android.tools.lint.client.api
Class JavaParser.ResolvedMethod

java.lang.Object
  extended by com.android.tools.lint.client.api.JavaParser.ResolvedNode
      extended by com.android.tools.lint.client.api.JavaParser.ResolvedMethod
Enclosing class:
JavaParser

public abstract static class JavaParser.ResolvedMethod
extends JavaParser.ResolvedNode

A method or constructor declaration


Constructor Summary
JavaParser.ResolvedMethod()
           
 
Method Summary
 boolean argumentMatchesType(int index, java.lang.String signature)
          Returns true if the parameter at the given index matches the given type signature
abstract  int getArgumentCount()
           
abstract  JavaParser.TypeDescriptor getArgumentType(int index)
           
abstract  JavaParser.ResolvedClass getContainingClass()
           
abstract  java.lang.String getName()
           
 JavaParser.ResolvedAnnotation getParameterAnnotation(java.lang.String type, int parameterIndex)
          Searches for the annotation of the given type on the method
abstract  java.lang.Iterable<JavaParser.ResolvedAnnotation> getParameterAnnotations(int index)
          Returns any annotations defined on the given parameter of this method
abstract  JavaParser.TypeDescriptor getReturnType()
           
 JavaParser.ResolvedMethod getSuperMethod()
          Returns the super implementation of the given method, if any
 boolean isConstructor()
           
 boolean isInPackage(java.lang.String pkg, boolean includeSubPackages)
          Returns true if this element is in the given package (or optionally, in one of its sub packages)
abstract  boolean matches(java.lang.String name)
          Returns whether this method name matches the given name
 
Methods inherited from class com.android.tools.lint.client.api.JavaParser.ResolvedNode
findAstNode, getAnnotation, getAnnotations, getModifiers, getSignature, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaParser.ResolvedMethod

public JavaParser.ResolvedMethod()
Method Detail

getName

@NonNull
public abstract java.lang.String getName()
Specified by:
getName in class JavaParser.ResolvedNode

matches

public abstract boolean matches(@NonNull
                                java.lang.String name)
Returns whether this method name matches the given name


getContainingClass

@NonNull
public abstract JavaParser.ResolvedClass getContainingClass()

getArgumentCount

public abstract int getArgumentCount()

getArgumentType

@NonNull
public abstract JavaParser.TypeDescriptor getArgumentType(int index)

argumentMatchesType

public boolean argumentMatchesType(int index,
                                   @NonNull
                                   java.lang.String signature)
Returns true if the parameter at the given index matches the given type signature


getReturnType

@Nullable
public abstract JavaParser.TypeDescriptor getReturnType()

isConstructor

public boolean isConstructor()

getParameterAnnotations

@NonNull
public abstract java.lang.Iterable<JavaParser.ResolvedAnnotation> getParameterAnnotations(int index)
Returns any annotations defined on the given parameter of this method


getParameterAnnotation

@Nullable
public JavaParser.ResolvedAnnotation getParameterAnnotation(@NonNull
                                                                     java.lang.String type,
                                                                     int parameterIndex)
Searches for the annotation of the given type on the method

Parameters:
type - the fully qualified name of the annotation to check
parameterIndex - the index of the parameter to look up
Returns:
the annotation, or null if not found

getSuperMethod

@Nullable
public JavaParser.ResolvedMethod getSuperMethod()
Returns the super implementation of the given method, if any


isInPackage

public boolean isInPackage(@NonNull
                           java.lang.String pkg,
                           boolean includeSubPackages)
Description copied from class: JavaParser.ResolvedNode
Returns true if this element is in the given package (or optionally, in one of its sub packages)

Overrides:
isInPackage in class JavaParser.ResolvedNode
Parameters:
pkg - the package name
includeSubPackages - whether to include subpackages
Returns:
true if the element is in the given package