SDA SE Wiki

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

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

research:jtransformer:api:java:pefs:2.9:annotatedt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
  
 +=== annotatedT(#​annotated,​ #​annotation) ===
 +++ Java 5 Syntax Element | - supported since JTransformer 2.3.  ++
 +
 +Represents the annotation of a syntax element.
 +
 +=== Attributes ===
 +== ==
 + ​**#​annotated:​** id \\ 
 +the id of the syntax element.((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 [[http://​java.sun.com/​j2se/​1.5.0/​docs/​api/​java/​lang/​annotation/​ElementType.html|possible values]] for the @Target "​Meta-Annotation"​.))
 +
 +**#​annotation:​**[[annotationT|annotationT]]\\ ​
 +the annotation.
 +
 +=== Sample Java Source ===
 +== ==
 +<​Code>​
 +@ThisAnnotation ​            //​case 2 : If the annotation is a marker annotation the expression is
 +int anotherField; ​          // ​        ​flagged by a markerAnnotationT(#​id) fact.
 +</​Code>​
 +=== Its PEF Representation ===
 +== ==
 +<Code lang-prolog>​
 +fieldT(#​Field,​ _, type(basic, int, 0), '​anotherField',​ '​null'​),​
 +annotatedT(#​Field,​ #​Annotation),​
 +annotationT(#​Annotation,​ #Parent, #Enclosing, #​AnnotationType,​ []),
 +markerAnnotationT(#​Annotation),​
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation('​Java',​annotatedT,​[
 +     ​ast_arg(id, ​            ​mult(1,​1,​no ), id,   ​[id]),​
 +     ​ast_arg(annotation, ​    ​mult(1,​1,​no ), id,   ​[annotationT])
 +]).</​Code>​
research/jtransformer/api/java/pefs/2.9/annotatedt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019