public abstract class SimpleQualifierParameterAnnotationConverter<Q> extends Object implements QualifierParameterAnnotationConverter<Q>
getQualifier(javax.lang.model.element.AnnotationMirror)
should be implemented to convert
an annotation to a type system specific qualifier (e.g. @Regex or @Tainted).Modifier and Type | Field and Description |
---|---|
protected Q |
BOTTOM |
protected Q |
DEFAULT_QUAL |
protected CombiningOperation<Q> |
lowerOp |
protected String |
MULTI_ANNO_NAME_PREFIX |
static String |
POLY_NAME |
static String |
PRIMARY_TARGET |
protected static String |
SOURCE_VALUE_NAME |
static String |
TARGET_PARAM_NAME |
protected Q |
TOP |
protected CombiningOperation<Q> |
upperOp |
protected static String |
WILDCARD_NAME |
Constructor and Description |
---|
SimpleQualifierParameterAnnotationConverter(AnnotationConverterConfiguration<Q> config)
Construct a SimpleQualifierParameterAnnotationConverter.
|
Modifier and Type | Method and Description |
---|---|
QualParams<Q> |
fromAnnotations(Collection<? extends AnnotationMirror> annos)
Convert a list of AnnotationMirrors to a QualParams.
|
Set<String> |
getDeclaredParameters(Element elt,
Set<AnnotationMirror> declAnnotations,
ExtendedTypeMirror type)
Get the names of all parameters declared on a class, interface, enum,
or method declaration
Element . |
abstract Q |
getQualifier(AnnotationMirror anno)
Create a type system qualifier based on an annotation.
|
protected boolean |
hasPolyAnnotationCheck(ExtendedTypeMirror type) |
boolean |
isAnnotationSupported(AnnotationMirror anno)
Checks if an annotation is supported by the current type system.
|
protected QualParams<Q> |
specialCaseHandle(AnnotationMirror anno)
Special case handle the AnnotationMirror.
|
public static final String PRIMARY_TARGET
public static final String TARGET_PARAM_NAME
public static final String POLY_NAME
protected static final String SOURCE_VALUE_NAME
protected static final String WILDCARD_NAME
protected final String MULTI_ANNO_NAME_PREFIX
protected final CombiningOperation<Q> lowerOp
protected final CombiningOperation<Q> upperOp
protected final Q BOTTOM
protected final Q TOP
protected final Q DEFAULT_QUAL
public SimpleQualifierParameterAnnotationConverter(AnnotationConverterConfiguration<Q> config)
public abstract Q getQualifier(AnnotationMirror anno)
anno
- the annotationprotected QualParams<Q> specialCaseHandle(AnnotationMirror anno)
public QualParams<Q> fromAnnotations(Collection<? extends AnnotationMirror> annos)
fromAnnotations
in interface AnnotationConverter<QualParams<Q>>
annos
- the collection of type annotations to parsepublic boolean isAnnotationSupported(AnnotationMirror anno)
AnnotationConverter
AnnotationMirror
could affect the result of fromAnnotations
.isAnnotationSupported
in interface AnnotationConverter<QualParams<Q>>
anno
- the annotation to checkpublic Set<String> getDeclaredParameters(Element elt, Set<AnnotationMirror> declAnnotations, ExtendedTypeMirror type)
QualifierParameterAnnotationConverter
Element
.getDeclaredParameters
in interface QualifierParameterAnnotationConverter<Q>
elt
- the element to inspect for parametersdeclAnnotations
- the declaration annotations on elttype
- the ExtendedTypeMirror for the element, after stub file annotations have been appliedprotected boolean hasPolyAnnotationCheck(ExtendedTypeMirror type)