Class TypeVarUseApplier
- java.lang.Object
-
- org.checkerframework.framework.util.element.TypeVarUseApplier
-
public class TypeVarUseApplier extends java.lang.Object
Apply annotations to the use of a type parameter declaration.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
accepts(AnnotatedTypeMirror type, javax.lang.model.element.Element element)
Returns true if type is an AnnotatedTypeVariable, or an AnnotatedArrayType with a type variable component, and the element is not a TYPE_PARAMETER.static void
apply(AnnotatedTypeMirror type, javax.lang.model.element.Element element, AnnotatedTypeFactory atypeFactory)
void
extractAndApply()
Applies the bound annotations from the declaration of the type parameter and then applies the explicit annotations written on the type variable.
-
-
-
Method Detail
-
apply
public static void apply(AnnotatedTypeMirror type, javax.lang.model.element.Element element, AnnotatedTypeFactory atypeFactory) throws ElementAnnotationUtil.UnexpectedAnnotationLocationException
-
accepts
public static boolean accepts(AnnotatedTypeMirror type, javax.lang.model.element.Element element)
Returns true if type is an AnnotatedTypeVariable, or an AnnotatedArrayType with a type variable component, and the element is not a TYPE_PARAMETER.- Returns:
- true if type is an AnnotatedTypeVariable, or an AnnotatedArrayType with a type variable component, and the element is not a TYPE_PARAMETER
-
extractAndApply
public void extractAndApply() throws ElementAnnotationUtil.UnexpectedAnnotationLocationException
Applies the bound annotations from the declaration of the type parameter and then applies the explicit annotations written on the type variable.- Throws:
ElementAnnotationUtil.UnexpectedAnnotationLocationException
- if invalid location for an annotation was found
-
-