@Override public void visitMemberValuePair(MemberValuePair node) { lombok.ast.AnnotationElement element = new lombok.ast.AnnotationElement(); element.astName(toIdentifier(node.name, node.sourceStart, node.sourceEnd)); element.astValue((lombok.ast.AnnotationValue) toTree(node.value)); set(node, setPosition(node, element)); }
@Override public void visitMemberValuePair(MemberValuePair node) { lombok.ast.AnnotationElement element = new lombok.ast.AnnotationElement(); element.astName(toIdentifier(node.name, node.sourceStart, node.sourceEnd)); element.astValue((lombok.ast.AnnotationValue) toTree(node.value)); set(node, setPosition(node, element)); }
@Override public void visitMemberValuePair(MemberValuePair node) { lombok.ast.AnnotationElement element = new lombok.ast.AnnotationElement(); element.astName(toIdentifier(node.name, node.sourceStart, node.sourceEnd)); element.astValue((lombok.ast.AnnotationValue) toTree(node.value)); set(node, setPosition(node, element)); }
@Override public void visitSingleMemberAnnotation(SingleMemberAnnotation node) { lombok.ast.Annotation annot = createAnnotation(node); lombok.ast.AnnotationElement element = new lombok.ast.AnnotationElement(); element.astValue((lombok.ast.AnnotationValue) toTree(node.memberValue)); annot.astElements().addToEnd(element); annot.setPosition(toPosition(node.sourceStart, node.declarationSourceEnd)); set(node, annot); }
@Override public void visitSingleMemberAnnotation(SingleMemberAnnotation node) { lombok.ast.Annotation annot = createAnnotation(node); lombok.ast.AnnotationElement element = new lombok.ast.AnnotationElement(); element.astValue((lombok.ast.AnnotationValue) toTree(node.memberValue)); annot.astElements().addToEnd(element); annot.setPosition(toPosition(node.sourceStart, node.declarationSourceEnd)); set(node, annot); }
@Override public void visitSingleMemberAnnotation(SingleMemberAnnotation node) { lombok.ast.Annotation annot = createAnnotation(node); lombok.ast.AnnotationElement element = new lombok.ast.AnnotationElement(); element.astValue((lombok.ast.AnnotationValue) toTree(node.memberValue)); annot.astElements().addToEnd(element); annot.setPosition(toPosition(node.sourceStart, node.declarationSourceEnd)); set(node, annot); }
public Node createAnnotationElement(Node name, Node value) { return posify(new AnnotationElement().astName(createIdentifierIfNeeded(name, currentPos())).rawValue(value)); }
public Node createAnnotationElement(Node name, Node value) { return posify(new AnnotationElement().astName(createIdentifierIfNeeded(name, currentPos())).rawValue(value)); }
public Node createAnnotationElement(Node name, Node value) { return posify(new AnnotationElement().astName(createIdentifierIfNeeded(name, currentPos())).rawValue(value)); }
public Node createAnnotationFromElement(Node value) { Annotation result = new Annotation(); if (value != null) { result.rawElements().addToEnd(posify(new AnnotationElement().rawValue(value))); } return posify(result); }
public Node createAnnotationFromElement(Node value) { Annotation result = new Annotation(); if (value != null) { result.rawElements().addToEnd(posify(new AnnotationElement().rawValue(value))); } return posify(result); }
public Node createAnnotationFromElement(Node value) { Annotation result = new Annotation(); if (value != null) { result.rawElements().addToEnd(posify(new AnnotationElement().rawValue(value))); } return posify(result); }
@Override public void visitAnnotation(JCAnnotation node) { Annotation a = new Annotation(); a.rawAnnotationTypeReference(toTree(node.getAnnotationType(), FlagKey.TYPE_REFERENCE)); for (JCExpression elem : node.getArguments()) { AnnotationElement e = new AnnotationElement(); if (elem instanceof JCAssign) { JCExpression rawName = ((JCAssign) elem).getVariable(); if (rawName instanceof JCIdent) e.astName(setPos(rawName, new Identifier().astValue(((JCIdent)rawName).getName().toString()))); elem = ((JCAssign) elem).getExpression(); } e.rawValue(toTree(elem)); a.astElements().addToEnd(e); } set(node, a); } }
@Override public void visitAnnotation(JCAnnotation node) { Annotation a = new Annotation(); a.rawAnnotationTypeReference(toTree(node.getAnnotationType(), FlagKey.TYPE_REFERENCE)); for (JCExpression elem : node.getArguments()) { AnnotationElement e = new AnnotationElement(); if (elem instanceof JCAssign) { JCExpression rawName = ((JCAssign) elem).getVariable(); if (rawName instanceof JCIdent) e.astName(setPos(rawName, new Identifier().astValue(((JCIdent)rawName).getName().toString()))); elem = ((JCAssign) elem).getExpression(); } e.rawValue(toTree(elem)); a.astElements().addToEnd(e); } set(node, a); } }
@Override public void visitAnnotation(JCAnnotation node) { Annotation a = new Annotation(); a.rawAnnotationTypeReference(toTree(node.getAnnotationType(), FlagKey.TYPE_REFERENCE)); for (JCExpression elem : node.getArguments()) { AnnotationElement e = new AnnotationElement(); if (elem instanceof JCAssign) { JCExpression rawName = ((JCAssign) elem).getVariable(); if (rawName instanceof JCIdent) e.astName(setPos(rawName, new Identifier().astValue(((JCIdent)rawName).getName().toString()))); elem = ((JCAssign) elem).getExpression(); } e.rawValue(toTree(elem)); a.astElements().addToEnd(e); } set(node, a); } }