public class MethodInfo extends MethodDescriptor implements XMethod, AnnotatedObject
| Modifier and Type | Class and Description |
|---|---|
static class |
MethodInfo.Builder |
| Modifier and Type | Field and Description |
|---|---|
static MethodInfo[] |
EMPTY_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotation(AnnotationValue annotationValue)
Destructively add an annotation.
|
void |
addParameterAnnotation(int param,
AnnotationValue annotationValue)
Destructively add a parameter annotation.
|
int |
compareTo(java.lang.Object rhs) |
int |
getAccessFlags()
Get the entity's access flags.
|
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 |
getClassName()
Get the full (dotted) name of the class (if the object represents a class)
or the class the entity is defined in (if a field or method).
|
AnnotatedObject |
getContainingScope() |
java.lang.annotation.ElementType |
getElementType() |
MethodDescriptor |
getMethodDescriptor() |
int |
getNumParams() |
java.lang.String |
getPackageName()
Get the (dotted) name of the package in which the entity is defined.
|
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 |
getSourceSignature()
Get the signature representing the field/method's type, including generic type
|
java.lang.String[] |
getThrownExceptions() |
boolean |
isAbstract() |
boolean |
isDeprecated()
Is the entity deprecated?
|
boolean |
isFinal()
Is the entity final?
|
boolean |
isNative() |
boolean |
isPrivate()
Is the entity private?
|
boolean |
isProtected()
Is the entity protected?
|
boolean |
isPublic()
Is the entity public?
|
boolean |
isResolved()
Did we find a declaration of this entity?
|
boolean |
isReturnTypeReferenceType() |
boolean |
isStub() |
boolean |
isSynchronized() |
boolean |
isSynthetic()
Is the entity synthetic?
|
boolean |
isUnconditionalThrower() |
boolean |
isUnsupported() |
boolean |
isVarArgs() |
boolean |
usesConcurrency() |
getBridgeSignature, isBridgedcompareTo, equals, getClassDescriptor, getName, getNameSigHashCode, getNameSigHashCode, getSignature, getSlashedClassName, hashCode, isStatic, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBridgeSignature, isBridgedgetName, getSignaturegetClassDescriptor, isStaticgetClassDescriptor, isStaticgetClassDescriptorpublic static final MethodInfo[] EMPTY_ARRAY
@CheckForNull public java.lang.String[] getThrownExceptions()
getThrownExceptions in interface XMethodpublic boolean isUnconditionalThrower()
isUnconditionalThrower in interface XMethodpublic boolean isUnsupported()
isUnsupported in interface XMethodpublic int getNumParams()
getNumParams in interface XMethodpublic boolean isAbstract()
isAbstract in interface XMethodpublic boolean isSynchronized()
isSynchronized in interface XMethodpublic boolean isReturnTypeReferenceType()
isReturnTypeReferenceType in interface XMethod@DottedClassName public java.lang.String getClassName()
ClassMembergetClassName in interface ClassMember@DottedClassName public java.lang.String getPackageName()
ClassMembergetPackageName in interface ClassMemberpublic java.lang.String getSourceSignature()
ClassMembergetSourceSignature in interface ClassMemberpublic int compareTo(java.lang.Object rhs)
compareTo in interface java.lang.ComparablecompareTo in class FieldOrMethodDescriptorpublic int getAccessFlags()
AccessibleEntitygetAccessFlags in interface AccessibleEntitypublic boolean isFinal()
AccessibleEntityisFinal in interface AccessibleEntitypublic boolean isPrivate()
AccessibleEntityisPrivate in interface AccessibleEntitypublic boolean isDeprecated()
AccessibleEntityisDeprecated in interface AccessibleEntitypublic boolean isProtected()
AccessibleEntityisProtected in interface AccessibleEntitypublic boolean isPublic()
AccessibleEntityisPublic in interface AccessibleEntitypublic boolean isSynthetic()
AccessibleEntityisSynthetic in interface AccessibleEntityisSynthetic in interface AnnotatedObjectpublic boolean isResolved()
ClassMemberisResolved in interface ClassMemberpublic java.util.Collection<ClassDescriptor> getParameterAnnotationDescriptors(int param)
XMethodgetParameterAnnotationDescriptors in interface XMethodparam - parameter number (0 for first parameter)@Nullable public AnnotationValue getParameterAnnotation(int param, ClassDescriptor desc)
XMethodgetParameterAnnotation in interface XMethodparam - parameter number (0 for first parameter)desc - ClassDescriptor of the annotation classpublic java.util.Collection<AnnotationValue> getParameterAnnotations(int param)
XMethodgetParameterAnnotations in interface XMethodparam - parameter number (0 for first parameter)public java.util.Collection<ClassDescriptor> getAnnotationDescriptors()
XMethodgetAnnotationDescriptors in interface XMethodgetAnnotationDescriptors in interface AnnotatedObjectpublic AnnotationValue getAnnotation(ClassDescriptor desc)
XMethodgetAnnotation in interface XMethodgetAnnotation in interface AnnotatedObjectdesc - ClassDescriptor of the annotation classpublic java.util.Collection<AnnotationValue> getAnnotations()
XMethodgetAnnotations in interface XMethodgetAnnotations in interface AnnotatedObjectpublic void addAnnotation(AnnotationValue annotationValue)
annotationValue - an AnnotationValue representing a method annotationpublic void addParameterAnnotation(int param,
AnnotationValue annotationValue)
param - parameter (0 == first parameter)annotationValue - an AnnotationValue representing a parameter annotationpublic MethodDescriptor getMethodDescriptor()
getMethodDescriptor in interface XMethodpublic java.lang.annotation.ElementType getElementType()
getElementType in interface AnnotatedObject@CheckForNull public AnnotatedObject getContainingScope()
getContainingScope in interface AnnotatedObjectpublic boolean isVarArgs()
public boolean usesConcurrency()
usesConcurrency in interface XMethodFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.