Package com.sun.codemodel

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


        } else {
            writeResourceWSDLLocation(className, cls, urlField, exField);
        }

        //write class comment - JAXWS warning
        JDocComment comment = cls.javadoc();

        if (service.getJavaDoc() != null) {
            comment.add(service.getJavaDoc());
            comment.add("\n\n");
        }
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

        ObjectMapper mapper = new ObjectMapper();
        TextNode titleNode = mapper.createObjectNode().textNode("some title");

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

        assertThat(result, sameInstance(jclass.javadoc()));
        assertThat(result.size(), is(1));
        assertThat((String) result.get(0), is("some title\n<p>\n"));

    }
}
View Full Code Here

        ObjectMapper mapper = new ObjectMapper();
        TextNode descriptionNode = mapper.createObjectNode().textNode("some description");

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

        assertThat(result, sameInstance(jclass.javadoc()));
        assertThat(result.size(), is(1));
        assertThat((String) result.get(0), is("some description"));

    }
}
View Full Code Here

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

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

        assertThat(result, sameInstance(jclass.javadoc()));
        assertThat(result.size(), is(1));
        assertThat((String) result.get(0), is(RequiredRule.REQUIRED_COMMENT_TEXT));

    }
View Full Code Here

          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

    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");
        }
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
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
View Full Code Here

    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");
        }
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.