@Override public JCAnnotation inline(Inliner inliner) throws CouldNotResolveImportException { return inliner .maker() .Annotation( getAnnotationType().inline(inliner), inliner.<JCExpression>inlineList(getArguments())); } }
public JCTree visitAnnotation(AnnotationTree node, P p) { JCAnnotation t = (JCAnnotation) node; JCTree annotationType = copy(t.annotationType, p); List<JCExpression> args = copy(t.args, p); return M.at(t.pos).Annotation(annotationType, args); }
public JCTree visitAnnotation(AnnotationTree node, P p) { JCAnnotation t = (JCAnnotation) node; JCTree annotationType = copy(t.annotationType, p); List<JCExpression> args = copy(t.args, p); return M.at(t.pos).Annotation(annotationType, args); }
public AnnotationTree Annotation(Tree type, List<? extends ExpressionTree> arguments) { ListBuffer<JCExpression> lb = new ListBuffer<JCExpression>(); for (ExpressionTree t : arguments) lb.append((JCExpression)t); return make.at(NOPOS).Annotation((JCTree)type, lb.toList()); }
/** Create annotation trees from annotations. */ public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes) { if (attributes == null) return List.nil(); ListBuffer<JCAnnotation> result = new ListBuffer<JCAnnotation>(); for (List<Attribute.Compound> i = attributes; i.nonEmpty(); i=i.tail) { Attribute a = i.head; result.append(Annotation(a)); } return result.toList(); }
/** Create annotation trees from annotations. */ public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes) { if (attributes == null) return List.nil(); ListBuffer<JCAnnotation> result = new ListBuffer<JCAnnotation>(); for (List<Attribute.Compound> i = attributes; i.nonEmpty(); i=i.tail) { Attribute a = i.head; result.append(Annotation(a)); } return result.toList(); }
/** Create annotation trees from annotations. */ public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes) { if (attributes == null) return List.nil(); ListBuffer<JCAnnotation> result = new ListBuffer<JCAnnotation>(); for (List<Attribute.Compound> i = attributes; i.nonEmpty(); i=i.tail) { Attribute a = i.head; result.append(Annotation(a)); } return result.toList(); }
@Override public JCAnnotation inline(Inliner inliner) throws CouldNotResolveImportException { return inliner .maker() .Annotation( getAnnotationType().inline(inliner), inliner.<JCExpression>inlineList(getArguments())); } }
/** Create annotation trees from annotations. */ public List<JCAnnotation> Annotations(List<Attribute.Compound> attributes) { if (attributes == null) return List.nil(); ListBuffer<JCAnnotation> result = new ListBuffer<JCAnnotation>(); for (List<Attribute.Compound> i = attributes; i.nonEmpty(); i=i.tail) { Attribute a = i.head; result.append(Annotation(a)); } return result.toList(); }
/** Annotation = "@" Qualident [ "(" AnnotationFieldValues ")" ] * @param pos position of "@" token */ JCAnnotation annotation(int pos) { // accept(AT); // AT consumed by caller checkAnnotations(); JCTree ident = qualident(); List<JCExpression> fieldValues = annotationFieldValuesOpt(); JCAnnotation ann = F.at(pos).Annotation(ident, fieldValues); storeEnd(ann, S.prevEndPos()); return ann; }
@Override public boolean visitAnnotation(Annotation node) { int start = node.getPosition().getStart(); int end = node.getPosition().getEnd(); // Newer javacs //int end = node.astAnnotationTypeReference().getPosition().getEnd(); // Older javacs return set(node, setPos(start, end, treeMaker.Annotation(toTree(node.astAnnotationTypeReference()), toList(JCExpression.class, node.astElements())))); }
/** Annotation = "@" Qualident [ "(" AnnotationFieldValues ")" ] * @param pos position of "@" token */ JCAnnotation annotation(int pos) { // accept(AT); // AT consumed by caller checkAnnotations(); JCTree ident = qualident(); List<JCExpression> fieldValues = annotationFieldValuesOpt(); JCAnnotation ann = F.at(pos).Annotation(ident, fieldValues); storeEnd(ann, S.prevEndPos()); return ann; }
@Override public boolean visitAnnotation(Annotation node) { int start = node.getPosition().getStart(); int end = node.getPosition().getEnd(); // Newer javacs //int end = node.astAnnotationTypeReference().getPosition().getEnd(); // Older javacs return set(node, setPos(start, end, treeMaker.Annotation(toTree(node.astAnnotationTypeReference()), toList(JCExpression.class, node.astElements())))); }
@Override public boolean visitAnnotation(Annotation node) { int start = node.getPosition().getStart(); int end = node.getPosition().getEnd(); // Newer javacs //int end = node.astAnnotationTypeReference().getPosition().getEnd(); // Older javacs return set(node, setPos(start, end, treeMaker.Annotation(toTree(node.astAnnotationTypeReference()), toList(JCExpression.class, node.astElements())))); }
public JCTree visitAnnotation(AnnotationTree node, P p) { JCAnnotation t = (JCAnnotation) node; JCTree annotationType = copy(t.annotationType, p); List<JCExpression> args = copy(t.args, p); if (t.getKind() == Tree.Kind.TYPE_ANNOTATION) { JCAnnotation newTA = M.at(t.pos).TypeAnnotation(annotationType, args); newTA.attribute = t.attribute; return newTA; } else { JCAnnotation newT = M.at(t.pos).Annotation(annotationType, args); newT.attribute = t.attribute; return newT; } }
public JCTree visitAnnotation(AnnotationTree node, P p) { JCAnnotation t = (JCAnnotation) node; JCTree annotationType = copy(t.annotationType, p); List<JCExpression> args = copy(t.args, p); if (t.getKind() == Tree.Kind.TYPE_ANNOTATION) { JCAnnotation newTA = M.at(t.pos).TypeAnnotation(annotationType, args); newTA.attribute = t.attribute; return newTA; } else { JCAnnotation newT = M.at(t.pos).Annotation(annotationType, args); newT.attribute = t.attribute; return newT; } }
public JCAnnotation visitCompoundInternal(Attribute.Compound compound) { ListBuffer<JCExpression> args = new ListBuffer<JCExpression>(); for (List<Pair<Symbol.MethodSymbol,Attribute>> values = compound.values; values.nonEmpty(); values=values.tail) { Pair<MethodSymbol,Attribute> pair = values.head; JCExpression valueTree = translate(pair.snd); args.append(Assign(Ident(pair.fst), valueTree).setType(valueTree.type)); } return Annotation(Type(compound.type), args.toList()); } public void visitArray(Attribute.Array array) {
public JCAnnotation visitCompoundInternal(Attribute.Compound compound) { ListBuffer<JCExpression> args = new ListBuffer<JCExpression>(); for (List<Pair<Symbol.MethodSymbol,Attribute>> values = compound.values; values.nonEmpty(); values=values.tail) { Pair<MethodSymbol,Attribute> pair = values.head; JCExpression valueTree = translate(pair.snd); args.append(Assign(Ident(pair.fst), valueTree).setType(valueTree.type)); } return Annotation(Type(compound.type), args.toList()); } public JCAnnotation visitTypeCompoundInternal(Attribute.TypeCompound compound) {
public JCAnnotation visitCompoundInternal(Attribute.Compound compound) { ListBuffer<JCExpression> args = new ListBuffer<JCExpression>(); for (List<Pair<Symbol.MethodSymbol,Attribute>> values = compound.values; values.nonEmpty(); values=values.tail) { Pair<MethodSymbol,Attribute> pair = values.head; JCExpression valueTree = translate(pair.snd); args.append(Assign(Ident(pair.fst), valueTree).setType(valueTree.type)); } return Annotation(Type(compound.type), args.toList()); } public void visitArray(Attribute.Array array) {
public JCAnnotation visitCompoundInternal(Attribute.Compound compound) { ListBuffer<JCExpression> args = new ListBuffer<JCExpression>(); for (List<Pair<Symbol.MethodSymbol,Attribute>> values = compound.values; values.nonEmpty(); values=values.tail) { Pair<MethodSymbol,Attribute> pair = values.head; JCExpression valueTree = translate(pair.snd); args.append(Assign(Ident(pair.fst), valueTree).setType(valueTree.type)); } return Annotation(Type(compound.type), args.toList()); } public JCAnnotation visitTypeCompoundInternal(Attribute.TypeCompound compound) {