public class TypeQualifierApplications
extends java.lang.Object
Constructor and Description |
---|
TypeQualifierApplications() |
Modifier and Type | Method and Description |
---|---|
static void |
clearInstance() |
static TypeQualifierAnnotation |
constructTypeQualifierAnnotation(AnnotationValue v)
Resolve a raw AnnotationValue into a TypeQualifierAnnotation.
|
static void |
constructTypeQualifierAnnotation(java.util.Set<TypeQualifierAnnotation> set,
AnnotationValue v)
Resolve a raw AnnotationValue into a TypeQualifierAnnotation, storing
result in given Set.
|
static java.util.Collection<TypeQualifierAnnotation> |
getApplicableApplications(AnnotatedObject o)
Get the Collection of resolved TypeQualifierAnnotations representing
directly applied and default (outer scope) type qualifier annotations for
given AnnotatedObject.
|
static java.util.Collection<TypeQualifierAnnotation> |
getApplicableApplications(XMethod o,
int parameter)
Get the Collection of resolved TypeQualifierAnnotations representing
directly applied and default (outer scope) type qualifier annotations for
given method parameter.
|
static void |
getDirectApplications(java.util.Set<TypeQualifierAnnotation> result,
AnnotatedObject o,
java.lang.annotation.ElementType e)
Populate a Set of TypeQualifierAnnotations representing directly-applied
type qualifier annotations on given AnnotatedObject.
|
static void |
getDirectApplications(java.util.Set<TypeQualifierAnnotation> result,
XMethod o,
int parameter)
Populate a Set of TypeQualifierAnnotations representing directly-applied
type qualifier annotations on given method parameter.
|
static TypeQualifierAnnotation |
getDirectTypeQualifierAnnotation(XMethod xmethod,
int parameter,
TypeQualifierValue<?> typeQualifierValue)
Get the TypeQualifierAnnotation directly applied to given method
parameter.
|
static TypeQualifierAnnotation |
getEffectiveTypeQualifierAnnotation(AnnotatedObject o,
TypeQualifierValue<?> typeQualifierValue)
Get the effective TypeQualifierAnnotation on given AnnotatedObject.
|
static TypeQualifierAnnotation |
getEffectiveTypeQualifierAnnotation(XMethod xmethod,
int parameter,
TypeQualifierValue<?> typeQualifierValue)
Get the effective TypeQualifierAnnotation on given method parameter.
|
static TypeQualifierAnnotation |
getInheritedTypeQualifierAnnotation(XMethod xmethod,
int parameter,
TypeQualifierValue<?> typeQualifierValue)
Get the effective inherited TypeQualifierAnnotation on the given instance
method parameter.
|
static TypeQualifierAnnotation |
getInheritedTypeQualifierAnnotation(XMethod o,
TypeQualifierValue<?> typeQualifierValue)
Get the effective inherited TypeQualifierAnnotation on given instance
method.
|
static void |
updateAnnotations(AnnotatedObject object) |
public static void clearInstance()
public static void updateAnnotations(AnnotatedObject object)
public static void getDirectApplications(java.util.Set<TypeQualifierAnnotation> result, XMethod o, int parameter)
result
- Set of TypeQualifierAnnotationso
- a methodparameter
- a parameter (0 == first parameter)public static void getDirectApplications(java.util.Set<TypeQualifierAnnotation> result, AnnotatedObject o, java.lang.annotation.ElementType e)
result
- Set of TypeQualifierAnnotationso
- an AnnotatedObjecte
- ElementType representing kind of annotated objectpublic static TypeQualifierAnnotation constructTypeQualifierAnnotation(AnnotationValue v)
v
- a raw AnnotationValuepublic static void constructTypeQualifierAnnotation(java.util.Set<TypeQualifierAnnotation> set, AnnotationValue v)
set
- Set of resolved TypeQualifierAnnotationsv
- a raw AnnotationValuepublic static java.util.Collection<TypeQualifierAnnotation> getApplicableApplications(AnnotatedObject o)
NOTE: does not properly account for inherited annotations on instance methods. It is ok to call this method to find out generally-relevant TypeQualifierAnnotations, but not to find the effective TypeQualifierAnnotation.
o
- an AnnotatedObjectpublic static java.util.Collection<TypeQualifierAnnotation> getApplicableApplications(XMethod o, int parameter)
NOTE: does not properly account for inherited annotations on instance method parameters. It is ok to call this method to find out generally-relevant TypeQualifierAnnotations, but not to find the effective TypeQualifierAnnotation.
o
- a methodparameter
- a parameter (0 == first parameter)public static TypeQualifierAnnotation getEffectiveTypeQualifierAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue)
o
- an AnnotatedObjecttypeQualifierValue
- a TypeQualifierValue specifying kind of annotation we want to
look uppublic static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod o, TypeQualifierValue<?> typeQualifierValue)
o
- an XMethodtypeQualifierValue
- the kind of TypeQualifierValue we are looking for@CheckForNull public static TypeQualifierAnnotation getEffectiveTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue)
xmethod
- a methodparameter
- a parameter (0 == first parameter)typeQualifierValue
- the kind of TypeQualifierValue we are looking for@CheckForNull @CheckReturnValue public static TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue)
xmethod
- a methodparameter
- a parameter (0 == first parameter)typeQualifierValue
- the kind of TypeQualifierValue we are looking for@CheckForNull public static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue)
xmethod
- an instance methodparameter
- a parameter (0 == first parameter)typeQualifierValue
- the kind of TypeQualifierValue we are looking forFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.