public class AnnotationChecker extends ContextVisitor
context, outer, prune, rethrowMissingDependencieserror, job, nf, tsbypass, bypassParent| Constructor and Description |
|---|
AnnotationChecker(Job job,
TypeSystem ts,
NodeFactory nf) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<EnumInstance> |
annotationElementTypesForDeclaration(Declaration decl) |
void |
checkAnnotationApplicability(AnnotationElem n,
Declaration decl)
Is the annotation element
annotation applicable
to Declaration decl? For example, if annotation is "@Override" then decl
better be a methodInstance that overrides another method. |
protected void |
checkOverrideAnnotation(Declaration decl) |
protected void |
checkTargetMetaAnnotation(AnnotationElementValueArray targetKinds,
AnnotationElem n,
Declaration decl) |
protected Node |
leaveCall(Node old,
Node n,
NodeVisitor v) |
JL5TypeSystem |
typeSystem()
Returns the
TypeSystem that this Visitor is using. |
addDecls, addDecls, begin, context, context, enter, enter, enterScope, leave, rethrowMissingDependencies, superEntercatchErrors, enterCall, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactorybypass, bypass, bypassChildren, override, visitChildrencopy, finish, finish, lang, leave, override, toString, visitEdge, visitEdgeNoOverridepublic AnnotationChecker(Job job, TypeSystem ts, NodeFactory nf)
protected Node leaveCall(Node old, Node n, NodeVisitor v) throws SemanticException
leaveCall in class ErrorHandlingVisitorSemanticExceptionpublic JL5TypeSystem typeSystem()
ErrorHandlingVisitorTypeSystem that this Visitor is using.typeSystem in class ErrorHandlingVisitorTypeSystempublic void checkAnnotationApplicability(AnnotationElem n, Declaration decl) throws SemanticException
annotation applicable
to Declaration decl? For example, if annotation is "@Override" then decl
better be a methodInstance that overrides another method. If annotation's
type itself has annotations describing which targets are appropriate,
then decl must be an appropriate target.annotation - decl - SemanticExceptionprotected void checkOverrideAnnotation(Declaration decl) throws SemanticException
SemanticExceptionprotected void checkTargetMetaAnnotation(AnnotationElementValueArray targetKinds, AnnotationElem n, Declaration decl) throws SemanticException
SemanticExceptionpublic java.util.Collection<EnumInstance> annotationElementTypesForDeclaration(Declaration decl)