Examples of JDocComment


Examples of com.sun.codemodel.JDocComment

     *            method, which should have this title applied
     * @return the JavaDoc comment created to contain the title
     */
    @Override
    public JDocComment apply(String nodeName, JsonNode node, JDocCommentable generatableType, Schema schema) {
        JDocComment javadoc = generatableType.javadoc();

        javadoc.add(0, node.asText() + "\n<p>\n");

        return javadoc;
    }
View Full Code Here

Examples of com.sun.codemodel.JDocComment

     *            which should have this description applied
     * @return the JavaDoc comment created to contain the description
     */
    @Override
    public JDocComment apply(String nodeName, JsonNode node, JDocCommentable generatableType, Schema schema) {
        JDocComment javadoc = generatableType.javadoc();

        javadoc.append(node.asText());

        return javadoc;
    }
View Full Code Here

Examples of com.sun.codemodel.JDocComment

     *         <em>may</em> have an added not to mark this construct as
     *         required.
     */
    @Override
    public JDocComment apply(String nodeName, JsonNode node, JDocCommentable generatableType, Schema schema) {
        JDocComment javadoc = generatableType.javadoc();

        if (node.asBoolean()) {
            javadoc.append(REQUIRED_COMMENT_TEXT);

            if (ruleFactory.getGenerationConfig().isIncludeJsr303Annotations()
                    && generatableType instanceof JFieldVar) {
                ((JFieldVar) generatableType).annotate(NotNull.class);
            }
View Full Code Here

Examples of com.sun.codemodel.JDocComment

        String getterName = ("java.lang.Boolean".equals(typeName) ? "is" : "get")
                            + fo.getPropertyInfo().getName(true);

        JMethod method = dc.getMethod(getterName, new JType[0]);
        JDocComment doc = method.javadoc();
        int mods = method.mods().getValue();
        JType mtype = method.type();
        if (remapRet) {
            mtype = mtype.unboxify();
        }
View Full Code Here

Examples of com.sun.codemodel.JDocComment

        String setterName = "set" + fo.getPropertyInfo().getName(true);
        method = dc.getMethod(setterName, new JType[] {mtype});
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Updating setter: " + setterName);
        }
        JDocComment doc = method.javadoc();
        // remove existing method and define new one
        dc.methods().remove(method);

        int mods = method.mods().getValue();
        mtype = mtype.unboxify();
View Full Code Here

Examples of com.sun.codemodel.JDocComment

          String packetAuthor = (packet.getInfo() == null || packet.getInfo().getAuthor() == null || packet.getInfo().getAuthor().isEmpty()) ? "nobody" : packet.getInfo().getAuthor();
          LOGGER.debug("Packet author: {}", packetAuthor);

          StringBuilder packetJavadoc = new StringBuilder("Auto-generated by \"Packet generator\", on ").append(SDF.format(new Date())).append("\n").append(packetDescription)
              .append("\n\n@author ").append(packetAuthor);
          JDocComment jDocComment = packetClass.javadoc();
          jDocComment.add(packetJavadoc.toString());

          // get all fields in this packet
          List<PacketFieldType> fields = packet.getField();
          processFields(packetName, fields, packetClass, codeModel, fromClient);
        }
View Full Code Here

Examples of com.sun.codemodel.JDocComment

        String getterName = ("java.lang.Boolean".equals(typeName) ? "is" : "get")
                            + fo.getPropertyInfo().getName(true);

        JMethod method = dc.getMethod(getterName, new JType[0]);
        JDocComment doc = method.javadoc();
        int mods = method.mods().getValue();
        JType mtype = method.type();

        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Updating getter: " + getterName);
View Full Code Here

Examples of com.sun.codemodel.JDocComment

    private void write(Fault fault) throws JClassAlreadyExistsException {
        String className = Names.customExceptionClassName(fault);

        JDefinedClass cls = cm._class(className, ClassType.CLASS);
        JDocComment comment = cls.javadoc();
        if(fault.getJavaDoc() != null){
            comment.add(fault.getJavaDoc());
            comment.add("\n\n");
        }

        for (String doc : getJAXWSClassComment()) {
            comment.add(doc);
        }
       
        cls._extends(java.lang.Exception.class);

        //@WebFault
View Full Code Here

Examples of com.sun.codemodel.JDocComment

        final JInvocation invoke = delegateImpl.staticInvoke("valueOf");
        invoke.arg(JExpr._this());
        invoke.arg(toStringDelegateStyleParam);
        toStringMethod.body()._return(invoke);
       
        JDocComment doc = toStringMethod.javadoc();
        doc.add("Generates a String representation of the contents of this type.");
        doc.add("\nThis is an extension method, produced by the 'ts' xjc plugin");
        toStringMethod.annotate(Override.class);
    }
View Full Code Here

Examples of com.sun.codemodel.JDocComment

    private void write(Fault fault) throws JClassAlreadyExistsException {
        String className = Names.customExceptionClassName(fault);

        JDefinedClass cls = cm._class(className, ClassType.CLASS);
        JDocComment comment = cls.javadoc();
        if(fault.getJavaDoc() != null){
            comment.add(fault.getJavaDoc());
            comment.add("\n\n");
        }

        for (String doc : getJAXWSClassComment()) {
            comment.add(doc);
        }
       
        cls._extends(java.lang.Exception.class);

        //@WebFault
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.