Examples of AnnotationElement


Examples of com.asakusafw.utils.java.model.syntax.AnnotationElement

                                key),
                }));
    }

    private Annotation createSourceAnnotation(Source source) {
        AnnotationElement declaring = f.newAnnotationElement(
                f.newSimpleName("declaring"),
                f.newClassLiteral(bless(common.getModelType(source.getDeclaring()))));
        AnnotationElement name = f.newAnnotationElement(
                f.newSimpleName("name"),
                Models.toLiteral(f, common.getFieldNameOf(
                        source.getName(),
                        source.getType()).getToken()));
        return f.newNormalAnnotation(
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.AnnotationElement

                                key),
                }));
    }

    private Annotation createSourceAnnotation(Source source) {
        AnnotationElement declaring = f.newAnnotationElement(
                f.newSimpleName("declaring"),
                f.newClassLiteral(bless(common.getModelType(source.getDeclaring()))));
        AnnotationElement name = f.newAnnotationElement(
                f.newSimpleName("name"),
                Models.toLiteral(f, common.getFieldNameOf(
                        source.getName(),
                        source.getType()).getToken()));
        return f.newNormalAnnotation(
View Full Code Here

Examples of com.strobel.assembler.metadata.annotations.AnnotationElement

                return new ParameterAnnotationsAttribute(name, length, annotations);
            }

            case AttributeNames.AnnotationDefault: {
                final AnnotationElement defaultValue = AnnotationReader.readElement(scope, buffer);
                return new AnnotationDefaultAttribute(length, defaultValue);
            }

            case AttributeNames.Signature: {
                final int token = buffer.readUnsignedShort();
View Full Code Here

Examples of com.strobel.assembler.metadata.annotations.AnnotationElement

                return new ParameterAnnotationsAttribute(name, length, annotations);
            }

            case AttributeNames.AnnotationDefault: {
                final AnnotationElement defaultValue = AnnotationReader.readElement(scope, buffer);
                return new AnnotationDefaultAttribute(length, defaultValue);
            }

            case AttributeNames.Signature: {
                final int token = buffer.readUnsignedShort();
View Full Code Here

Examples of com.strobel.assembler.metadata.annotations.AnnotationElement

                return new ParameterAnnotationsAttribute(name, length, annotations);
            }

            case AttributeNames.AnnotationDefault: {
                final AnnotationElement defaultValue = AnnotationReader.readElement(scope, buffer);
                return new AnnotationDefaultAttribute(length, defaultValue);
            }

            case AttributeNames.Signature: {
                final int token = buffer.readUnsignedShort();
View Full Code Here

Examples of lombok.ast.AnnotationElement

                StrictListAccessor<AnnotationElement, Annotation> values =
                        annotation.astElements();
                if (values != null) {
                    Iterator<AnnotationElement> valueIterator = values.iterator();
                    while (valueIterator.hasNext()) {
                        AnnotationElement element = valueIterator.next();
                        AnnotationValue valueNode = element.astValue();
                        if (valueNode == null) {
                            continue;
                        }
                        if (valueNode instanceof StringLiteral) {
                            StringLiteral literal = (StringLiteral) valueNode;
View Full Code Here

Examples of lombok.ast.AnnotationElement

                StrictListAccessor<AnnotationElement, Annotation> values =
                        annotation.astElements();
                if (values != null) {
                    Iterator<AnnotationElement> valueIterator = values.iterator();
                    while (valueIterator.hasNext()) {
                        AnnotationElement element = valueIterator.next();
                        AnnotationValue valueNode = element.astValue();
                        if (valueNode == null) {
                            continue;
                        }
                        if (valueNode instanceof StringLiteral) {
                            StringLiteral literal = (StringLiteral) valueNode;
View Full Code Here

Examples of lombok.ast.AnnotationElement

    if (tail != null) for (Node n : tail) if (n != null) result.rawExpressions().addToEnd(n);
    return posify(result);
  }
 
  public Node createAnnotationElement(Node name, Node value) {
    return posify(new AnnotationElement().astName(createIdentifierIfNeeded(name, currentPos())).rawValue(value));
  }
View Full Code Here

Examples of lombok.ast.AnnotationElement

  }
 
  public Node createAnnotationFromElement(Node value) {
    Annotation result = new Annotation();
    if (value != null) {
      result.rawElements().addToEnd(posify(new AnnotationElement().rawValue(value)));
    }
    return posify(result);
  }
View Full Code Here

Examples of lombok.ast.AnnotationElement

   
    @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);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.