Codota Logo
JDefinedClass.javadoc
Code IndexAdd Codota to your IDE (free)

How to use
javadoc
method
in
com.sun.codemodel.JDefinedClass

Best Java code snippets using com.sun.codemodel.JDefinedClass.javadoc (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: phoenixnap/springmvc-raml-plugin

  @Override
  public JDocComment apply(ApiResourceMetadata controllerMetadata, JDefinedClass generatableType) {
    String comments = "No description";
    if (controllerMetadata.getDescription() != null) {
      comments = controllerMetadata.getDescription();
    }
    generatableType.javadoc().append(comments);
    generatableType.javadoc().append("\n(Generated with springmvc-raml-parser v." + CodeModelHelper.getVersion() + ")");
    return generatableType.javadoc();
  }
}
origin: phoenixnap/springmvc-raml-plugin

public AbstractBuilder withClassComment(String classComment) {
  pojoCreationCheck();
  JDocComment javadoc = this.pojo.javadoc();
  // javadoc.add
  javadoc.add(toJavaComment(classComment));
  javadoc.add("\n\nGenerated using springmvc-raml-plugin on " + new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new Date()));
  return this;
}
origin: org.jvnet.ws.wadl/wadl-core

/**
 * Extract documentation from a WADL resource type and add it to a corresponding 
 * generated interface.
 *
 * @param n the WADL resource type.
 * @param iface the corresponding interface.
 */
void generateClassDoc(ResourceTypeNode n, JDefinedClass iface) {
  if (n.getDoc().size() < 1)
    return;
  Doc d = n.getDoc().get(0);
  JDocComment jdoc = iface.javadoc();
  appendTextContent(d, jdoc);
}
origin: org.jvnet.ws.wadl/wadl-core

/**
 * Extract documentation from a WADL resource and add it to a corresponding 
 * generated class.
 *
 * @param r the WADL resource.
 * @param c the corresponding class.
 */
public void generateClassDoc(ResourceNode r, JDefinedClass c) {
  if (r.getDoc().size() < 1)
    return;
  Doc d = r.getDoc().get(0);
  JDocComment jdoc = c.javadoc();
  appendTextContent(d, jdoc);
}
origin: org.jvnet.ws.wadl/wadl-core

/**
 * Extract documentation from a WADL param with enumerated values and add it to the corresponding
 * Java enum.
 *
 * @param p the WADL param.
 * @param e the corresponding enum.
 */
public void generateEnumDoc(Param p, JDefinedClass e) {
  if (p.getDoc().size() < 1)
    return;
  Doc d = p.getDoc().get(0);
  JDocComment jdoc = e.javadoc();
  appendTextContent(d, jdoc);
}
origin: com.linkedin.pegasus/restli-tools

private static void generateClassJavadoc(JDefinedClass clazz, RecordTemplate schema)
{
 final String doc = schema.data().getString("doc");
 if (doc != null)
 {
  clazz.javadoc().append(doc);
 }
}
origin: org.jsmiparser/jsmiparser-codegen

protected void addJavadocs() {
  JDocComment c = definedClass.javadoc();
  c.add("<pre>\n");
  for (Iterator<SmiNamedNumber> iterator = type.getNamedNumbers().iterator(); iterator.hasNext(); ) {
    SmiNamedNumber namedNumber = iterator.next();
    c.add(namedNumber.toString());
    if (iterator.hasNext()) {
      c.add(",");
    }
    c.add("\n");
  }
  c.add("</pre>\n");
}
origin: Evolveum/midpoint

@NotNull
private JDefinedClass createAnonListClass(JFieldVar field, ClassOutline classOutline) {
  JDefinedClass anonymous;
  try {
    CPropertyInfo propertyInfo = classOutline.target.getProperty(field.name());
    anonymous = classOutline.implClass._class(JMod.PRIVATE | JMod.STATIC, "Anon" + propertyInfo.getName(true));
    JDocComment comment = anonymous.javadoc();
    comment.append("TODO Can't be anonymous because of NPE bug in CodeModel generator, will be fixed later.");
  } catch (JClassAlreadyExistsException ex) {
    throw new RuntimeException(ex.getMessage(), ex);
  }
  return anonymous;
}
origin: mulesoft-labs/raml-jaxrs-codegen

private JDefinedClass createCustomHttpMethodAnnotation(final String httpMethod)
  throws JClassAlreadyExistsException
{
  final JPackage pkg = codeModel._package(getSupportPackage());
  final JDefinedClass annotationClazz = pkg._annotationTypeDeclaration(httpMethod);
  annotationClazz.annotate(Target.class).param("value", ElementType.METHOD);
  annotationClazz.annotate(Retention.class).param("value", RetentionPolicy.RUNTIME);
  annotationClazz.annotate(HttpMethod.class).param("value", httpMethod);
  annotationClazz.javadoc().add("Custom JAX-RS support for HTTP " + httpMethod + ".");
  httpMethodAnnotations.put(httpMethod.toUpperCase(), annotationClazz);
  return annotationClazz;
}
origin: org.raml/raml-jaxrs-codegen-core

private JDefinedClass createCustomHttpMethodAnnotation(final String httpMethod)
  throws JClassAlreadyExistsException
{
  final JPackage pkg = codeModel._package(getSupportPackage());
  final JDefinedClass annotationClazz = pkg._annotationTypeDeclaration(httpMethod);
  annotationClazz.annotate(Target.class).param("value", ElementType.METHOD);
  annotationClazz.annotate(Retention.class).param("value", RetentionPolicy.RUNTIME);
  annotationClazz.annotate(HttpMethod.class).param("value", httpMethod);
  annotationClazz.javadoc().add("Custom JAX-RS support for HTTP " + httpMethod + ".");
  httpMethodAnnotations.put(httpMethod.toUpperCase(), annotationClazz);
  return annotationClazz;
}
origin: sun-jaxb/jaxb-xjc

/**
 * Generates the minimum {@link JDefinedClass} skeleton
 * without filling in its body.
 */
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;
    }
  };
}
origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

/**
 * Generates the minimum {@link JDefinedClass} skeleton
 * without filling in its body.
 */
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;
    }
  };
}
origin: apache/servicemix-bundles

/**
 * Generates the minimum {@link JDefinedClass} skeleton
 * without filling in its body.
 */
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;
    }
  };
}
origin: org.glassfish.metro/webservices-tools

/**
 * Generates the minimum {@link JDefinedClass} skeleton
 * without filling in its body.
 */
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;
    }
  };
}
origin: com.sap.cloud.yaas.rammler/rammler-core

/**
 * Javadoc setup.
 */
@RequiredArgsConstructor
private enum JavaDocs
{
  DOCS_TOP_CLASS("top_class"),
  DOCS_CONSTRUCTOR("constructor");
  private static final String JAVADOC_DIR = "arbitrary-action-builder-procreator";
  private final String name;
  String fillTemplate(final Object... params)
  {
    return String.format(JavadocUtils.getTemplateString(JAVADOC_DIR, name), params);
  }
}
origin: org.kuali.rice/rice-development-tools

private void renderElementsClass(JDefinedClass classModel, List<FieldModel> fields) throws Exception {
  
  // define constants class
  JDefinedClass elementsClass = classModel._class(JMod.STATIC, Util.ELEMENTS_CLASS_NAME);
  
  // generate the javadoc on the top of the Elements class
  JDocComment javadoc = elementsClass.javadoc();
  javadoc.append(Util.ELEMENTS_CLASS_JAVADOC);
  
  // go through each field and create a corresponding constant
  for (FieldModel fieldModel : fields) {
    if (Util.isCommonElement(fieldModel.fieldName)) {
      continue;
    }
    JFieldVar elementFieldVar = elementsClass.field(JMod.FINAL | JMod.STATIC, String.class, Util.toConstantsVariable(fieldModel.fieldName));
    elementFieldVar.init(JExpr.lit(fieldModel.fieldName));
  }
}

origin: mulesoft-labs/raml-jaxrs-codegen

protected void createResourceInterface(final Resource resource) throws Exception
{
  final String resourceInterfaceName = Names.buildResourceInterfaceName(resource);
  final JDefinedClass resourceInterface = context.createResourceInterface(resourceInterfaceName);
  context.setCurrentResourceInterface(resourceInterface);
  final String path = strip(resource.getRelativeUri(), "/");
  resourceInterface.annotate(Path.class).param(DEFAULT_ANNOTATION_PARAMETER,
    StringUtils.defaultIfBlank(path, "/"));
  if (isNotBlank(resource.getDescription()))
  {
    resourceInterface.javadoc().add(resource.getDescription());
  }
  addResourceMethods(resource, resourceInterface, path);
}
origin: bonitasoft/bonita-engine

public JDefinedClass addEntity(final BusinessObject bo) throws JClassAlreadyExistsException {
  final String qualifiedName = bo.getQualifiedName();
  validateClassNotExistsInRuntime(qualifiedName);
  JDefinedClass entityClass = codeGenerator.addClass(qualifiedName);
  entityClass = codeGenerator.addInterface(entityClass, org.bonitasoft.engine.bdm.Entity.class.getName());
  entityClass.javadoc().add(bo.getDescription());
  final JAnnotationUse entityAnnotation = codeGenerator.addAnnotation(entityClass, Entity.class);
  entityAnnotation.param("name", entityClass.name());
  addIndexAnnotations(bo, entityClass);
  addUniqueConstraintAnnotations(bo, entityClass);
  addQueriesAnnotation(bo, entityClass);
  addFieldsAndMethods(bo, entityClass);
  codeGenerator.addDefaultConstructor(entityClass);
  return entityClass;
}
origin: bonitasoft/bonita-engine

public JDefinedClass addEntity(final BusinessObject bo) throws JClassAlreadyExistsException {
  final String qualifiedName = bo.getQualifiedName();
  validateClassNotExistsInRuntime(qualifiedName);
  JDefinedClass entityClass = codeGenerator.addClass(qualifiedName);
  entityClass = codeGenerator.addInterface(entityClass, org.bonitasoft.engine.bdm.Entity.class.getName());
  entityClass.javadoc().add(bo.getDescription());
  final JAnnotationUse entityAnnotation = codeGenerator.addAnnotation(entityClass, Entity.class);
  entityAnnotation.param("name", entityClass.name());
  addIndexAnnotations(bo, entityClass);
  addUniqueConstraintAnnotations(bo, entityClass);
  addQueriesAnnotation(bo, entityClass);
  addFieldsAndMethods(bo, entityClass);
  codeGenerator.addDefaultConstructor(entityClass);
  return entityClass;
}
origin: org.kuali.rice/rice-development-tools

private void renderConstantsClass(JDefinedClass classModel) throws Exception {
  
  // define constants class
  JDefinedClass constantsClass = classModel._class(JMod.STATIC, Util.CONSTANTS_CLASS_NAME);
  
  // generate the javadoc on the top of the Constants class
  JDocComment javadoc = constantsClass.javadoc();
  javadoc.append(Util.CONSTANTS_CLASS_JAVADOC);
  
  // render root element name
  JFieldVar rootElementField = constantsClass.field(JMod.FINAL | JMod.STATIC, String.class, Util.ROOT_ELEMENT_NAME_FIELD);
  rootElementField.init(JExpr.lit(Util.toLowerCaseFirstLetter(classModel.name())));
  
  // render type name
  JFieldVar typeNameField = constantsClass.field(JMod.FINAL | JMod.STATIC, String.class, Util.TYPE_NAME_FIELD);
  typeNameField.init(JExpr.lit(classModel.name() + Util.TYPE_NAME_SUFFIX));
  
}

com.sun.codemodelJDefinedClassjavadoc

Javadoc

Creates, if necessary, and returns the class javadoc for this JDefinedClass

Popular methods of JDefinedClass

  • method
  • _extends
  • field
  • _implements
  • name
    JClass name accessor. For example, for java.util.List, this method returns "List""
  • constructor
    Adds a constructor to this class.
  • fields
    Returns all the fields declred in this class. The returned Map is a read-only live view.
  • annotate
    Adding ability to annotate a class
  • fullName
    Gets the fully qualified name of this class.
  • methods
  • owner
  • _class
    Add a new public nested class to this class.
  • owner,
  • _class,
  • getMethod,
  • _package,
  • dotclass,
  • enumConstant,
  • staticInvoke,
  • staticRef,
  • init

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JOptionPane (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now