Package net.jangaroo.jooc.model

Examples of net.jangaroo.jooc.model.AnnotationModel


  private static void addEvents(CompilationUnitModel compilationUnitModel, List<Event> events) {
    for (Event event : events) {
      ClassModel classModel = compilationUnitModel.getClassModel();
      String eventTypeQName = generateEventClass(compilationUnitModel, event);
      AnnotationModel annotationModel = new AnnotationModel("Event",
              new AnnotationPropertyModel("name", "'" + event.name + "'"),
              new AnnotationPropertyModel("type", "'" + eventTypeQName + "'"));
      annotationModel.setAsdoc(toAsDoc(event.doc) + String.format("\n * @eventType %s.NAME", eventTypeQName));
      classModel.addAnnotation(annotationModel);
      System.err.println("*** adding event " + event.name + " to class " + classModel.getName());
    }
  }
View Full Code Here


        needsExcludeClassAnnotation = needsExcludeClassAnnotation &&
                !Jooc.PUBLIC_API_INCLUSION_ANNOTATION_NAME.equals(metaName) &&
                !Jooc.PUBLIC_API_EXCLUSION_ANNOTATION_NAME.equals(metaName);
      }
      if (needsExcludeClassAnnotation) {
        annotatedModel.addAnnotation(new AnnotationModel(Jooc.PUBLIC_API_EXCLUSION_ANNOTATION_NAME));
      }
    }
  }
View Full Code Here

    // This may appear as a class initializer, in which case we can simply skip it.
  }

  @Override
  public void visitAnnotation(Annotation annotation) throws IOException {
    AnnotationModel annotationModel = new AnnotationModel();
    modelStack.push(annotationModel);
    recordAsdoc(annotation.getLeftBracket());
    consumeRecordedAsdoc();
    annotation.getIde().visit(this);
    visitIfNotNull(annotation.getOptAnnotationParameters());
View Full Code Here

  public static void main(String[] args) {
    // TODO: move to unit test!
    ClassModel classModel = new ClassModel("com.acme.Foo");
    classModel.setAsdoc("This is the Foo class.");

    AnnotationModel annotation = new AnnotationModel("ExtConfig",
      new AnnotationPropertyModel("target", "'foo.Bar'"));
    classModel.addAnnotation(annotation);

    FieldModel field = new FieldModel("FOOBAR");
    field.setType("String");
View Full Code Here

TOP

Related Classes of net.jangaroo.jooc.model.AnnotationModel

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.