Package com.sun.codemodel

Examples of com.sun.codemodel.JDefinedClass.javadoc()


        LOG.info("- E> " + implClass.name());
        continue;
      }

      // LOG.info("+ E> " + namewithoutType);
      implClass.javadoc().clear();
      implClass.javadoc().append(kmlJavaDocElement.getJavaDoc());
    }

    LOG.info("trying to add javadocs to found classes:");
    for (final ClassOutline classOutline : outline.getClasses()) {
View Full Code Here


        continue;
      }

      // LOG.info("+ E> " + namewithoutType);
      implClass.javadoc().clear();
      implClass.javadoc().append(kmlJavaDocElement.getJavaDoc());
    }

    LOG.info("trying to add javadocs to found classes:");
    for (final ClassOutline classOutline : outline.getClasses()) {
      final JDefinedClass implClass = classOutline.implClass;
View Full Code Here

        continue;
      }

      // LOG.info("+ C> " + namewithoutType);

      implClass.javadoc().clear();
      implClass.javadoc().append(kmlJavaDocElement.getJavaDoc());

      for (final FieldOutline fieldOutline : classOutline.getDeclaredFields()) {
        if (fieldOutline instanceof FieldOutline) {
          final CPropertyInfo property = fieldOutline.getPropertyInfo();
View Full Code Here

      }

      // LOG.info("+ C> " + namewithoutType);

      implClass.javadoc().clear();
      implClass.javadoc().append(kmlJavaDocElement.getJavaDoc());

      for (final FieldOutline fieldOutline : classOutline.getDeclaredFields()) {
        if (fieldOutline instanceof FieldOutline) {
          final CPropertyInfo property = fieldOutline.getPropertyInfo();
View Full Code Here

    private EnumOutline generateEnumDef(CEnumLeafInfo e) {
        JDefinedClass type;

        type = getClassFactory().createClass(
            getContainer(e.parent, EXPOSED),e.shortName,e.getLocator(), ClassType.ENUM);
        type.javadoc().append(e.javadoc);

        return new EnumOutline(e, type) {
            @Override
            public @NotNull Outline parent() {
                return BeanGenerator.this;
View Full Code Here

  private JDefinedClass generateEnum(EnumDataSchema schema) throws JClassAlreadyExistsException
  {
    JDefinedClass enumClass = getPackage(schema.getNamespace())._class(JMod.PUBLIC, escapeReserved(schema.getName()), ClassType.ENUM);

    enumClass.javadoc().append(schema.getDoc());
    setDeprecatedAnnotationAndJavadoc(schema, enumClass);

    registerGeneratedClass(schema, enumClass);
    generateSchemaField(enumClass, schema);
View Full Code Here

  private JDefinedClass generateFixed(FixedDataSchema schema) throws JClassAlreadyExistsException
  {
    JDefinedClass fixedClass = getPackage(schema.getNamespace())._class(escapeReserved(schema.getName()));

    fixedClass.javadoc().append(schema.getDoc());
    setDeprecatedAnnotationAndJavadoc(schema, fixedClass);

    registerGeneratedClass(schema, fixedClass);

    fixedClass._extends(FixedTemplate.class);
View Full Code Here

  private JDefinedClass generateRecord(RecordDataSchema schema) throws JClassAlreadyExistsException
  {
    JDefinedClass templateClass = getPackage(schema.getNamespace())._class(escapeReserved(schema.getName()));

    templateClass.javadoc().append(schema.getDoc());
    setDeprecatedAnnotationAndJavadoc(schema, templateClass);

    registerGeneratedClass(schema, templateClass);

    templateClass._extends(RecordTemplate.class);
View Full Code Here

        JDefinedClass jc = context.getCodeModel()._class(clsName, getClassType());
       
        SchemaSupport schema = context.getSchemaGenerator();
        String documentation = service.getServiceInfo().getDocumentation();
        if( documentation != null ){
            jc.javadoc().add(documentation);   
        }
       
        annotate(context, service, jc, binding);
       
        // Process operations
View Full Code Here

        ObjectMapper mapper = new ObjectMapper();
        BooleanNode descriptionNode = mapper.createObjectNode().booleanNode(false);

        JDocComment result = rule.apply("fooBar", descriptionNode, jclass, null);

        assertThat(result, sameInstance(jclass.javadoc()));
        assertThat(result.size(), is(0));
    }

}
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.