Java Code Examples for com.sun.codemodel.internal.JMethod#javadoc()

The following examples show how to use com.sun.codemodel.internal.JMethod#javadoc() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServiceGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 2
Source File: ServiceGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 3
Source File: ServiceGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 4
Source File: WebServiceWrapperGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example 5
Source File: ServiceGenerator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 6
Source File: ServiceGenerator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 7
Source File: WebServiceWrapperGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example 8
Source File: ServiceGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 9
Source File: ServiceGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 10
Source File: ServiceGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 11
Source File: ServiceGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 12
Source File: ServiceGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 13
Source File: WebServiceWrapperGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example 14
Source File: ServiceGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 15
Source File: ServiceGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 16
Source File: WebServiceWrapperGenerator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example 17
Source File: ServiceGenerator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example 18
Source File: WebServiceWrapperGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example 19
Source File: WebServiceWrapperGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example 20
Source File: ServiceGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}