Examples of javaDoc()


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

       nestedBuilderClass = cc.implClass._class(JMod.PUBLIC | JMod.STATIC, "Builder");
 
    final Map<String, FieldOutline> fieldOutlineasMap = Util.getRequiredFieldsAsMap(cc);

    final JMethod defaultConstructor = nestedBuilderClass.constructor(JMod.PUBLIC);
    defaultConstructor.javadoc().add("Value constructor with only mandatory fields");
    defaultConstructor.body().invoke("super");

    for (final JFieldVar field : required) {
//      FieldOutline fo = fieldOutlineasMap.get(field.name());
//      if (fo == null) {
View Full Code Here

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

    m.javadoc().append("Create an instance of ").append(cc.ref);
    final JInvocation returntype = JExpr._new(cc.implRef);
    for (final JFieldVar field : required) {

      final JVar arg = m.param(JMod.FINAL, field.type(), field.name());
      m.javadoc().addParam(arg).append("required parameter");
      returntype.arg(arg);
    }
    m.body()._return(returntype);
  }
View Full Code Here

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

//      if (fo.getPropertyInfo().isCollection()) {
//        continue;
//      }
     
      final JVar arg = defaultConstructor.param(JMod.FINAL, field.type(), field.name());
      defaultConstructor.javadoc().addParam(arg).append("required parameter");
      defaultConstructor.body().assign(JExpr.refthis(field.name()), arg);
    }
   
    debugOut.append("c> " + cc.implRef.name() + " :: public " + cc.target.shortName + "(");
    for (final JFieldVar field : required) {
View Full Code Here

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

  private void createNoArgConstructor(final ClassOutline classOutline, final int mods) {
    // Create the default, no-arg constructor
    final JMethod defaultConstructor = classOutline.implClass.constructor(mods);
    if (mods == JMod.PRIVATE) {
      defaultConstructor.annotate(Deprecated.class);
      defaultConstructor.javadoc().add("Default no-arg constructor is private. Use overloaded constructor instead! ");
      defaultConstructor.javadoc().add("(Temporary solution, till a better and more suitable ObjectFactory is created.) ");
    }
    defaultConstructor.body().invoke("super");
  }
View Full Code Here

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

    // Create the default, no-arg constructor
    final JMethod defaultConstructor = classOutline.implClass.constructor(mods);
    if (mods == JMod.PRIVATE) {
      defaultConstructor.annotate(Deprecated.class);
      defaultConstructor.javadoc().add("Default no-arg constructor is private. Use overloaded constructor instead! ");
      defaultConstructor.javadoc().add("(Temporary solution, till a better and more suitable ObjectFactory is created.) ");
    }
    defaultConstructor.body().invoke("super");
  }

  private void createArgConstructor(final ClassOutlineImpl cc, final Collection<JFieldVar> required) {
View Full Code Here

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

  private void createArgConstructor(final ClassOutlineImpl cc, final Collection<JFieldVar> required) {
    final StringBuffer debugOut = new StringBuffer();
    final Map<String, FieldOutline> fieldOutlineasMap = Util.getRequiredFieldsAsMap(cc);

    final JMethod defaultConstructor = cc.implClass.constructor(JMod.PUBLIC);
    defaultConstructor.javadoc().add("Value constructor with only mandatory fields");
    defaultConstructor.body().invoke("super");

    for (final JFieldVar field : required) {
      // FieldOutline fo = fieldOutlineasMap.get(field.name());
      // if (fo == null) {
View Full Code Here

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

      // LOG.info("!!!!! " + cc.implClass.name() + " is collection " + field.name() );
      // continue;
      // }

      final JVar arg = defaultConstructor.param(JMod.FINAL, Util.removeJAXBElement(cm, field.type()), field.name());
      defaultConstructor.javadoc().addParam(arg).append("required parameter");
      defaultConstructor.body().assign(JExpr.refthis(field.name()), arg);
    }

    debugOut.append("c> " + cc.implRef.name() + " :: public " + cc.target.shortName + "(");
    for (final JFieldVar field : required) {
View Full Code Here

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

    final JVar newValue = m.body().decl(fieldVar.type(), "newValue", JExpr._new(jaxbElementClass));
    final JInvocation methodInvoke = JExpr._this().invoke("set" + Util.upperFirst(fieldVar.name())).arg(newValue);
    m.body().add(methodInvoke);
    m.body()._return(newValue);

    m.javadoc().append("Creates a new instance of ");
    m.javadoc().append(fieldVar.type());
    m.javadoc().append("and set it to this." + fieldVar.name() + ".\n");

    final ArrayList<String> javadoc = new ArrayList<String>();
    javadoc.add("\n");
View Full Code Here

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

    final JInvocation methodInvoke = JExpr._this().invoke("set" + Util.upperFirst(fieldVar.name())).arg(newValue);
    m.body().add(methodInvoke);
    m.body()._return(newValue);

    m.javadoc().append("Creates a new instance of ");
    m.javadoc().append(fieldVar.type());
    m.javadoc().append("and set it to this." + fieldVar.name() + ".\n");

    final ArrayList<String> javadoc = new ArrayList<String>();
    javadoc.add("\n");
    javadoc.add("This method is a short version for:\n");
View Full Code Here

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

    m.body().add(methodInvoke);
    m.body()._return(newValue);

    m.javadoc().append("Creates a new instance of ");
    m.javadoc().append(fieldVar.type());
    m.javadoc().append("and set it to this." + fieldVar.name() + ".\n");

    final ArrayList<String> javadoc = new ArrayList<String>();
    javadoc.add("\n");
    javadoc.add("This method is a short version for:\n");
    javadoc.add("<pre>\n");
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.