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

Both sides previous revision Previous revision
Next revision
Previous revision
research:jtransformer:api:java:pefs:3.0:annotationmembert [2014/01/23 13:16]
Günter Kniesel
research:jtransformer:api:java:pefs:3.0:annotationmembert [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +=== annotationMemberT(#​id,​ #parent, #type, '​name',​ #default) ===
 +
 +
 +Represents a member (=field) of an annotation class. (++Java 5 Syntax Element | - supported since JTransformer 2.3.  ++)
 +
 +=== Attributes ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** [[classt|classT]]\\ ​
 +the annotation class containing this member. It is a class with property [[annotationtypet|annotationTypeT]].\\ ​
 +
 +**#type:** [[typeInst]]\\ ​
 +the type of the member.
 +
 +**'​name':​** atom\\ ​
 +the name of the member.
 +
 +**#​default:​** [[annotationExpressionType]],​ null\\
 +the optional default value (can be '​null'​).
 +
 +=== Sample Java Source ===
 +
 +== ==
 +<​Code>​
 +public @interface ThisAnnotation {
 + String value();
 +}
 +</​Code>​
 +
 +=== Its PEF Representation ===
 +
 +== ==
 +
 +<Code lang-prolog>​
 +classT(#​AnnotationType,​ #​CompilationUnit,​ '​ThisAnnotation',​ [#​AnnotationMember]),​
 +modifierT(#​AnnotationType,​ '​public'​),​
 +extendsT(#​AnnotationType,​ #​AnnotationClass),​
 +annotationTypeT(#​AnnotationType),​
 +annotationMemberT(#​AnnotationMember,​ #​AnnotationType,​ #TypeRef, '​value',​ '​null'​).
 +</​Code>​
 +
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​ ast_node_def('​Java',​annotationMemberT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,   ​[id]),​
 +     ​ast_arg(parent,​ mult(1,1,no ), id,   ​[id]), ​
 +     ​ast_arg(type, ​  ​mult(1,​1,​no ), id,   ​[typeInst]),​
 +     ​ast_arg(name, ​  ​mult(1,​1,​no ), attr, [atom]),
 +     ​ast_arg(expr, ​  ​mult(1,​1,​no ), id,   ​[annotationExpressionType,​nullType])
 +]).</​Code>​
research/jtransformer/api/java/pefs/3.0/annotationmembert.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019