Package edu.umd.cs.findbugs.ba
Class UnresolvedXMethod
java.lang.Object
edu.umd.cs.findbugs.ba.AbstractClassMember
edu.umd.cs.findbugs.ba.AbstractMethod
edu.umd.cs.findbugs.ba.UnresolvedXMethod
- All Implemented Interfaces:
AccessibleEntity
,ClassMember
,ComparableMethod
,XMethod
,AnnotatedObject
,FieldOrMethodName
,Serializable
,Comparable<ComparableMethod>
XMethod implementation for unresolvable methods. Returns some kind of
reasonable default answer to questions that can't be answered (e.g., what are
the access flags).
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Map
<ClassDescriptor, AnnotationValue> (package private) Map
<Integer, Map<ClassDescriptor, AnnotationValue>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotation
(AnnotationValue annotationValue) Destructively add an annotation.void
addParameterAnnotation
(int param, AnnotationValue annotationValue) Destructively add a parameter annotation.bridgeTo()
If nonnull, then this method is a synthetic method that overrides a method in a superclass.int
getAnnotation
(ClassDescriptor desc) Get the AnnotationValue of annotation applied directly to the method.Get ClassDescriptors (annotation classes) of annotations applied directly to this method.Get collection of all AnnotationValues applied directly to the method.getParameterAnnotation
(int param, ClassDescriptor desc) Get the AnnotationValue of annotation applied directly to given parameter.getParameterAnnotationDescriptors
(int param) Get ClassDescriptors (annotation classes) of annotations applied directly to this method's parameters.getParameterAnnotations
(int param) Get collection of all AnnotationValues applied directly to given parameter.Get the signature representing the field/method's type, including generic typeString[]
boolean
boolean
Seejava.lang.invoke.MethodHandle.PolymorphicSignature
boolean
boolean
Is the entity deprecated?boolean
Is this an identity methodboolean
boolean
isStub()
boolean
Is the entity synthetic?boolean
boolean
boolean
boolean
isVariableSynthetic
(int param) Is the variable synthetic?boolean
boolean
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractMethod
getMethodDescriptor, getNumParams, isBridge, isNative, isSynchronized, resolveAccessMethodForMethod, toString
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractClassMember
equals, getAccessFlags, getClassDescriptor, getClassName, getName, getPackageName, getSignature, hashCode, isFinal, isPrivate, isProtected, isPublic, isReferenceType, isResolved, isStatic, markAsResolved
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.umd.cs.findbugs.ba.AccessibleEntity
getAccessFlags, getClassDescriptor, isFinal, isPrivate, isProtected, isPublic, isStatic
Methods inherited from interface edu.umd.cs.findbugs.classfile.analysis.AnnotatedObject
getClassDescriptor
Methods inherited from interface edu.umd.cs.findbugs.ba.ClassMember
getClassName, getName, getPackageName, getSignature, isResolved
Methods inherited from interface edu.umd.cs.findbugs.classfile.FieldOrMethodName
getClassDescriptor, isStatic
-
Field Details
-
methodParameterAnnotations
Map<Integer,Map<ClassDescriptor, methodParameterAnnotationsAnnotationValue>> -
methodAnnotations
Map<ClassDescriptor,AnnotationValue> methodAnnotations
-
-
Constructor Details
-
UnresolvedXMethod
-
-
Method Details
-
isReturnTypeReferenceType
public boolean isReturnTypeReferenceType()- Returns:
- true if method's return type is a reference type, false otherwise
-
compareTo
-
getElementType
-
getContainingScope
-
getThrownExceptions
- Returns:
- the exceptions this method is declared to throw
-
isUnconditionalThrower
public boolean isUnconditionalThrower()- Returns:
- does this method unconditionally throw an exception?
-
isUnsupported
public boolean isUnsupported()- Returns:
- does this method unconditionally throw an UnsupportedOperationException?
-
isAbstract
public boolean isAbstract() -
isSynthetic
public boolean isSynthetic()Description copied from interface:AccessibleEntity
Is the entity synthetic? -
isDeprecated
public boolean isDeprecated()Description copied from interface:AccessibleEntity
Is the entity deprecated? -
isVarArgs
public boolean isVarArgs()- Returns:
- is this a var args method?
-
usesConcurrency
public boolean usesConcurrency()- Returns:
- does the method directly make use of concurrency/threads/synchronization?
-
getSourceSignature
Description copied from interface:ClassMember
Get the signature representing the field/method's type, including generic type -
isStub
public boolean isStub()- Returns:
- is the method a synthetic stub method?
-
isIdentity
public boolean isIdentity()Description copied from interface:XMethod
Is this an identity method -
addParameterAnnotation
Description copied from interface:XMethod
Destructively add a parameter annotation.- Parameters:
param
- parameter (0 == first parameter)annotationValue
- an AnnotationValue representing a parameter annotation
-
getParameterAnnotationDescriptors
Description copied from interface:XMethod
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
-
hasParameterAnnotations
public boolean hasParameterAnnotations() -
getParameterAnnotation
Description copied from interface:XMethod
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
Description copied from interface:XMethod
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
-
addAnnotation
Description copied from interface:XMethod
Destructively add an annotation. We do this for "built-in" annotations that might not be directly evident in the code. It's not a great idea in general, but we can get away with it as long as it's done early enough (i.e., before anyone asks what annotations this method has.)- Parameters:
annotationValue
- an AnnotationValue representing a method annotation
-
getAnnotationDescriptors
Description copied from interface:XMethod
Get ClassDescriptors (annotation classes) of annotations applied directly to this method.- Returns:
- ClassDescriptors of annotations applied directly to this method
-
getAnnotation
Description copied from interface:XMethod
Get the AnnotationValue of annotation applied directly to the method.- 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
Description copied from interface:XMethod
Get collection of all AnnotationValues applied directly to the method.- Returns:
- Collection of all AnnotationValues applied directly to the method
-
bridgeFrom
-
bridgeTo
Description copied from interface:XMethod
If nonnull, then this method is a synthetic method that overrides a method in a superclass. This method simply forwards the call to the method it bridges to, which is a method with an identical name but possibly co-variant arguments and return values. -
getAccessMethodForMethod
-
getAccessMethodForField
-
isVariableSynthetic
public boolean isVariableSynthetic(int param) Description copied from interface:XMethod
Is the variable synthetic? -
usesInvokeDynamic
public boolean usesInvokeDynamic() -
hasPolymorphicSignature
public boolean hasPolymorphicSignature()Description copied from interface:XMethod
Seejava.lang.invoke.MethodHandle.PolymorphicSignature
- Returns:
- is this method polymorphic as defined in
MethodHandle
-