Class TypeVarUseApplier
java.lang.Object
org.checkerframework.framework.util.element.TypeVarUseApplier
Apply annotations to the use of a type parameter declaration.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
accepts
(AnnotatedTypeMirror type, 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, Element element, AnnotatedTypeFactory typeFactory) void
Applies the bound annotations from the declaration of the type parameter and then applies the explicit annotations written on the type variable.
-
Method Details
-
apply
public static void apply(AnnotatedTypeMirror type, Element element, AnnotatedTypeFactory typeFactory) throws ElementAnnotationUtil.UnexpectedAnnotationLocationException -
accepts
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
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
-