SE & SDA Wiki

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

User Tools

Site Tools



memberValueT(#id, #parent, #annotationMember, #valueLiteral)

Java 5 Syntax Element

Represents a member value pair in an annotationT expression. For example queries see the annotationT description.

Arguments

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

#parent: annotationT
the parent element.
Either the ID of the annotated element or memberValueT fact in case of a nested annotation.
e.g. @Ann2 in @Ann(value = 1, ann1 = @Ann2(id=1))

#annotationMember : annotationMemberT, null
the referenced annotation member.

#valueLiteral: AnnotationExpression, null

Sample Java Source

@ThisAnnotation("Important")
public void method(){
}

Its PEF Representation

annotationT(#Annotation, #Annotated, #Annotated, _, [#MemberValue]),
memberValueT(#MemberValue, #Annotation, 'null', #Literal),
literalT(#Literal, #MemberValue, #Annotated, #Type, 'Important'),
annotatedT(#Method, #Annotation),
methodT(#Method,_,'method', [], #type, [], #body)

AST Specification

ast_node_def('Java',memberValueT,[
     ast_arg(id,     mult(1,1,no ), id,   [memberValueT]),
     ast_arg(parent, mult(1,1,no ), id,   [annotationT]), 
     ast_arg(ref,    mult(1,1,no ), id,   [annotationMemberT, nullType]),
     ast_arg(default,mult(1,1,no ), id,   [nullType, annotationExpressionType])
]).
research/jtransformer/api/java/pefs/3.0/membervaluet.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2018