Package net.sf.rej.java.attribute.annotations

Examples of net.sf.rej.java.attribute.annotations.Annotation


            sd.drawDefault(";");
        } else if (er instanceof DeprecatedAnnotationDefRow) {
          sd.drawIndent();
          sd.drawAnnotation("@Deprecated");
        } else if (er instanceof ClassAnnotationDefRow || er instanceof MethodAnnotationDefRow || er instanceof FieldAnnotationDefRow) {
          Annotation ann = null;
          if (er instanceof ClassAnnotationDefRow) {
            ann = ((ClassAnnotationDefRow)er).getAnnotation();
          } else if (er instanceof MethodAnnotationDefRow) {
            sd.drawIndent();
            ann = ((MethodAnnotationDefRow)er).getAnnotation();
          } else {
            sd.drawIndent();
            ann = ((FieldAnnotationDefRow)er).getAnnotation();
          }
         
          sd.drawAnnotation("@" + ia.getShortName(ann.getName()));
          if (ann.getElementValueCount() > 0) {
            sd.drawDefault("(");
            Map<String, ElementValue> elementValues = ann.getElementValues();
            boolean first = true;
            for (Entry<String, ElementValue> entry : elementValues.entrySet()) {
              if (!first) {
                sd.drawDefault(", ");
              } else {
View Full Code Here


    super.setPayload(data); // TODO: ser / deser
    ByteParser parser = new ByteArrayByteParser(data);
    parser.setBigEndian(true);
    int numAnnotations = parser.getShortAsInt();
    for (int i=0; i < numAnnotations; i++) {
      this.annotations.add(new Annotation(parser, this.pool));
    }
  }
View Full Code Here

    super.setPayload(data); // TODO: ser / de-ser
    ByteParser parser = new ByteArrayByteParser(data);
    parser.setBigEndian(true);
    int numAnnotations = parser.getShortAsInt();
    for (int i=0; i < numAnnotations; i++) {
      this.annotations.add(new Annotation(parser, this.pool));
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.rej.java.attribute.annotations.Annotation

Copyright © 2018 www.massapicom. 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.