FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba
Interface XMethod

All Superinterfaces:
AccessibleEntity, AnnotatedObject, ClassMember, java.lang.Comparable, FieldOrMethodName, java.io.Serializable
All Known Implementing Classes:
AbstractMethod, MethodInfo

public interface XMethod
extends ClassMember, AnnotatedObject

An XMethod represents symbolic information about a particular method.

If the resolved() method returns true, then any information queried from this object can be assumed to be accurate. If the resolved() method returns false, then FindBugs can't find the method and any information other than name/signature/etc. cannot be trusted.

Author:
David Hovemeyer, Bill Pugh

Method Summary
 AnnotationValue getAnnotation(ClassDescriptor desc)
          Get the AnnotationValue of annotation applied directly to the method.
 java.util.Collection<ClassDescriptor> getAnnotationDescriptors()
          Get ClassDescriptors (annotation classes) of annotations applied directly to this method.
 java.util.Collection<AnnotationValue> getAnnotations()
          Get collection of all AnnotationValues applied directly to the method.
 java.lang.String getBridgeSignature()
           
 MethodDescriptor getMethodDescriptor()
           
 int getNumParams()
           
 AnnotationValue getParameterAnnotation(int param, ClassDescriptor desc)
          Get the AnnotationValue of annotation applied directly to given parameter.
 java.util.Collection<ClassDescriptor> getParameterAnnotationDescriptors(int param)
          Get ClassDescriptors (annotation classes) of annotations applied directly to this method's parameters.
 java.util.Collection<AnnotationValue> getParameterAnnotations(int param)
          Get collection of all AnnotationValues applied directly to given parameter.
 java.lang.String[] getThrownExceptions()
           
 boolean isAbstract()
           
 boolean isBridged()
           
 boolean isNative()
           
 boolean isReturnTypeReferenceType()
           
 boolean isStub()
           
 boolean isSynchronized()
           
 boolean isUnconditionalThrower()
           
 boolean isUnsupported()
           
 boolean isVarArgs()
           
 boolean usesConcurrency()
           
 
Methods inherited from interface edu.umd.cs.findbugs.ba.ClassMember
getClassName, getName, getPackageName, getSignature, getSourceSignature, isResolved
 
Methods inherited from interface edu.umd.cs.findbugs.ba.AccessibleEntity
getAccessFlags, getClassDescriptor, isDeprecated, isFinal, isPrivate, isProtected, isPublic, isStatic, isSynthetic
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.umd.cs.findbugs.classfile.FieldOrMethodName
getClassDescriptor, isStatic
 
Methods inherited from interface edu.umd.cs.findbugs.classfile.analysis.AnnotatedObject
getClassDescriptor, getContainingScope, getElementType, isSynthetic
 

Method Detail

isNative

boolean isNative()

isAbstract

boolean isAbstract()

isSynchronized

boolean isSynchronized()

getNumParams

int getNumParams()

getMethodDescriptor

MethodDescriptor getMethodDescriptor()
Returns:
the MethodDescriptor identifying this object

getThrownExceptions

java.lang.String[] getThrownExceptions()
Returns:
the exceptions this method is declared to throw

isUnconditionalThrower

boolean isUnconditionalThrower()
Returns:
does this method unconditionally throw an exception?

usesConcurrency

boolean usesConcurrency()
Returns:
does the method directly make use of concurrency/threads/synchronization?

isStub

boolean isStub()
Returns:
is the method a synthetic stub method?

isBridged

boolean isBridged()
Returns:
whether the method is a bridge method

getBridgeSignature

java.lang.String getBridgeSignature()
Returns:
the signature for the bridge method

isUnsupported

boolean isUnsupported()
Returns:
does this method unconditionally throw an UnsupportedOperationException?

isVarArgs

boolean isVarArgs()
Returns:
is this a var args method?

isReturnTypeReferenceType

boolean isReturnTypeReferenceType()
Returns:
true if method's return type is a reference type, false otherwise

getParameterAnnotationDescriptors

java.util.Collection<ClassDescriptor> getParameterAnnotationDescriptors(int param)
Get ClassDescriptors (annotation classes) of annotations applied directly to this method's parameters.

Parameters:
param - parameter number (0 for first parameter)
Returns:
ClassDescriptors of annotations applied directly to this method's parameters

getParameterAnnotation

@CheckForNull
AnnotationValue getParameterAnnotation(int param,
                                                    ClassDescriptor desc)
Get the AnnotationValue of annotation applied directly to given parameter.

Parameters:
param - parameter number (0 for first parameter)
desc - ClassDescriptor of the annotation class
Returns:
AnnotationValue annotating the parameter, or null if parameter is not annotated with this kind of annotation

getParameterAnnotations

java.util.Collection<AnnotationValue> getParameterAnnotations(int param)
Get collection of all AnnotationValues applied directly to given parameter.

Parameters:
param - parameter number (0 for first parameter)
Returns:
Collection of all AnnotationValues applied directly to given parameter

getAnnotationDescriptors

java.util.Collection<ClassDescriptor> getAnnotationDescriptors()
Get ClassDescriptors (annotation classes) of annotations applied directly to this method.

Specified by:
getAnnotationDescriptors in interface AnnotatedObject
Returns:
ClassDescriptors of annotations applied directly to this method

getAnnotation

AnnotationValue getAnnotation(ClassDescriptor desc)
Get the AnnotationValue of annotation applied directly to the method.

Specified by:
getAnnotation in interface AnnotatedObject
Parameters:
desc - ClassDescriptor of the annotation class
Returns:
AnnotationValue annotating the method, or null if method is not annotated with this kind of annotation

getAnnotations

java.util.Collection<AnnotationValue> getAnnotations()
Get collection of all AnnotationValues applied directly to the method.

Specified by:
getAnnotations in interface AnnotatedObject
Returns:
Collection of all AnnotationValues applied directly to the method

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.