Search in sources :

Example 11 with JDocComment

use of com.sun.codemodel.JDocComment in project jsonschema2pojo by joelittlejohn.

the class RequiredArrayRule method addJavaDoc.

private void addJavaDoc(JDocCommentable docCommentable) {
    JDocComment javadoc = docCommentable.javadoc();
    javadoc.append(REQUIRED_COMMENT_TEXT);
}
Also used : JDocComment(com.sun.codemodel.JDocComment)

Example 12 with JDocComment

use of com.sun.codemodel.JDocComment in project jsonschema2pojo by joelittlejohn.

the class JavaNameRule method apply.

@Override
public JDocComment apply(String nodeName, JsonNode node, JsonNode parent, JDocCommentable generatableType, Schema currentSchema) {
    JDocComment javaDoc = generatableType.javadoc();
    javaDoc.append(String.format("%nCorresponds to the \"%s\" property.", nodeName));
    return javaDoc;
}
Also used : JDocComment(com.sun.codemodel.JDocComment)

Aggregations

JDocComment (com.sun.codemodel.JDocComment)12 JCodeModel (com.sun.codemodel.JCodeModel)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 JDefinedClass (com.sun.codemodel.JDefinedClass)4 Test (org.junit.Test)4 TextNode (com.fasterxml.jackson.databind.node.TextNode)3 JPackage (com.sun.codemodel.JPackage)2 IOException (java.io.IOException)2 MessagingException (javax.mail.MessagingException)2 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 JBlock (com.sun.codemodel.JBlock)1 JClass (com.sun.codemodel.JClass)1 JCommentPart (com.sun.codemodel.JCommentPart)1 JExpression (com.sun.codemodel.JExpression)1 JFieldVar (com.sun.codemodel.JFieldVar)1 JMethod (com.sun.codemodel.JMethod)1 JVar (com.sun.codemodel.JVar)1 Handler (io.vertx.core.Handler)1 HttpClient (io.vertx.core.http.HttpClient)1 WebClient (io.vertx.ext.web.client.WebClient)1