SDA SE Wiki

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

User Tools

Site Tools



annotationMemberT(#id,#parent,TYPE, 'name', #default)

Java 5 Syntax Element

Represents an annotation member construct.

Attributes

#id: id
the unique ID assigned to this fact.

#parent: classT
the parent annotation class attributed with annotationTypeT.

TYPE: type term
the type of the member.

'name': atom
the name of the construct.

#default: AnnotationExpression, null
the default expression is optional.

Sample Java Source

public @interface ThisAnnotation {
	String value();
}

Its PEF Representation

classT(#AnnotationType, #CompilationUnit, 'ThisAnnotation', [#AnnotationMember]),
modifierT(#AnnotationType, 'public'),
extendsT(#AnnotationType, #AnnotationClass),
annotationTypeT(#AnnotationType),
annotationMemberT(#AnnotationMember, #AnnotationType, type(class, ..., 0), 'value', 'null').

AST Specification

 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 ), attr, [typeTermType]),
     ast_arg(name,   mult(1,1,no ), attr, [atom]),
     ast_arg(expr,   mult(1,1,no ), id, [annotationExpressionType,nullType])
]).
research/jtransformer/api/java/pefs/2.9/annotationmembert.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019