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 TypeMethodDescriptionvoidaddAnnotation(AnnotationValue annotationValue) Destructively add an annotation.voidaddParameterAnnotation(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.intgetAnnotation(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[]booleanbooleanSeejava.lang.invoke.MethodHandle.PolymorphicSignaturebooleanbooleanIs the entity deprecated?booleanIs this an identity methodbooleanbooleanisStub()booleanIs the entity synthetic?booleanbooleanbooleanbooleanisVariableSynthetic(int param) Is the variable synthetic?booleanbooleanMethods inherited from class AbstractMethod
getMethodDescriptor, getNumParams, isBridge, isNative, isSynchronized, resolveAccessMethodForMethod, toStringMethods inherited from class AbstractClassMember
equals, getAccessFlags, getClassDescriptor, getClassName, getName, getPackageName, getSignature, hashCode, isFinal, isPrivate, isProtected, isPublic, isReferenceType, isResolved, isStatic, markAsResolvedMethods inherited from interface AccessibleEntity
getAccessFlags, getClassDescriptor, isFinal, isPrivate, isProtected, isPublic, isStaticMethods inherited from interface AnnotatedObject
getClassDescriptorMethods inherited from interface ClassMember
getClassName, getName, getPackageName, getSignature, isResolvedMethods inherited from interface FieldOrMethodName
getClassDescriptor, isStaticMethods inherited from interface XMethod
isAccessMethod
-
Field Details
-
methodParameterAnnotations
Map<Integer, Map<ClassDescriptor, AnnotationValue>> methodParameterAnnotations -
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:AccessibleEntityIs the entity synthetic? -
isDeprecated
public boolean isDeprecated()Description copied from interface:AccessibleEntityIs 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:ClassMemberGet the signature representing the field/method's type, including generic type -
isStub
public boolean isStub()- Returns:
- is the method a synthetic stub method?
-
isIdentity
-
addParameterAnnotation
Description copied from interface:XMethodDestructively add a parameter annotation.- Parameters:
param- parameter (0 == first parameter)annotationValue- an AnnotationValue representing a parameter annotation
-
getParameterAnnotationDescriptors
Description copied from interface:XMethodGet 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:XMethodGet 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:XMethodGet 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:XMethodDestructively 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:XMethodGet ClassDescriptors (annotation classes) of annotations applied directly to this method.- Returns:
- ClassDescriptors of annotations applied directly to this method
-
getAnnotation
Description copied from interface:XMethodGet 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:XMethodGet 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:XMethodIf 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:XMethodIs the variable synthetic? -
usesInvokeDynamic
public boolean usesInvokeDynamic() -
hasPolymorphicSignature
public boolean hasPolymorphicSignature()Description copied from interface:XMethodSeejava.lang.invoke.MethodHandle.PolymorphicSignature- Returns:
- is this method polymorphic as defined in
MethodHandle
-