SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools



annotatedT(#annotated, #annotation)

Java 5 Syntax Element

Represents the annotation of a syntax element.

Attributes

#annotated: id
the id of the syntax element.1)

#annotation:annotationT
the annotation.

Sample Java Source

@ThisAnnotation             //case 2 : If the annotation is a marker annotation the expression is
int anotherField;           //         flagged by a markerAnnotationT(#id) fact.

Its PEF Representation

fieldT(#Field, _, type(basic, int, 0), 'anotherField', 'null'),
annotatedT(#Field, #Annotation),
annotationT(#Annotation, #Field, #Enclosing, #AnnotationType, []),
markerAnnotationT(#Annotation),

AST Specification

ast_relation('Java',annotatedT,[
     ast_arg(id,             mult(1,1,no ), id,   [id]),
     ast_arg(annotation,     mult(1,1,no ), id,   [annotationT])
]).
1)
This can be the declaration of a field, parameter, local variable, constructor, method, type (class, interface, enum, annotation type), or package. For a reference see e.g. the possible values for the @Target “Meta-Annotation”.
research/jtransformer/api/java/pefs/3.0/annotatedt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2018