Examples of varParam()


Examples of com.helger.jcodemodel.JMethod.varParam()

                }
            }
            JVar param = interfaceMethod1.listVarParam();
            if (param != null) {
                AbstractJType paramType = visitorInterface.substituteSpecialType(param.type().elementType(), usedValueClassType, configuration.type().boxify(), types._RuntimeException);
                JVar argument = visitorMethod1.varParam(param.mods().getValue(), paramType, param.name());
                if (configuration.isFieldValue(interfaceMethod1, param.name())) {
                    visitorMethod1.body()._return(argument);
                    isGettable = true;
                }
            }
View Full Code Here

Examples of com.helger.jcodemodel.JMethod.varParam()

                    TypeMirror parameterTypeMirror = variable.asType();
                    AbstractJType parameterType = toJType(parameterTypeMirror, methodEnvironment);

                    JVar param;
                    if (executable.isVarArgs() && n == parameters.size() - 1) {
                        param = method.varParam(toJMod(variable.getModifiers()), parameterType.elementType(), parameterName);
                    } else {
                        param = method.param(toJMod(variable.getModifiers()), parameterType, parameterName);
                    }
                    Annotator parametorAnnotator = new Annotator(param, methodEnvironment);
                    parametorAnnotator.annotate(variable.getAnnotationMirrors());
View Full Code Here

Examples of com.helger.jcodemodel.JMethod.varParam()

                }
            }
            JVar param = interfaceMethod1.listVarParam();
            if (param != null) {
                AbstractJType argumentType = visitorInterface.substituteSpecialType(param.type().elementType(), usedValueClassType, configuration.type().boxify(), types._RuntimeException);
                JVar argument = visitorMethod1.varParam(param.mods().getValue(), argumentType, nameSource.get(param.name()));
                if (configuration.isFieldValue(interfaceMethod1, param.name())) {
                    invocation.arg(newValue);
                } else {
                    invocation.arg(argument);
                }
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

    // return false;
    // }
    final JMethod generateMarshalKmz = cc.implClass.method(JMod.PUBLIC, cc.implClass.owner().BOOLEAN, "marshalAsKmz");
    final JVar varName = generateMarshalKmz.param(stringClass, "name");
    varName.annotate(NotNull.class);
    final JVar varAdditionalFiles = generateMarshalKmz.varParam(kmlClass.boxify(), "additionalFiles");
    generateMarshalKmz._throws(IOException.class);
    final JVar varOut = generateMarshalKmz.body().decl(zipOutputStreamClass, "out", JExpr._new(zipOutputStreamClass).arg(JExpr._new(fileOutputStreamClass).arg(varName)));
    generateMarshalKmz.body().add(varOut.invoke("setComment").arg("KMZ-file created with Java API for KML. Visit us: http://code.google.com/p/javaapiforkml/"));
    generateMarshalKmz.body().add(JExpr._this().invoke(createAddToKmzFile).arg(JExpr._this()).arg(varOut).arg(JExpr.TRUE));
    final JForEach forEach = generateMarshalKmz.body().forEach(kmlClass, "kml", varAdditionalFiles);
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

        // Generating constructor
        // for e.g:  public ExampleService(WebServiceFeature ... features)
        if (options.target.isLaterThan(Options.Target.V2_2)) {
            JMethod constructor2 = cls.constructor(JMod.PUBLIC);
            constructor2.varParam(WebServiceFeature.class, "features");
            String constructor2Str = String.format("super(__getWsdlLocation(), %s, features);", serviceName);
            constructor2.body().directStatement(constructor2Str);
        }

        // Generating constructor
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

        // Generating constructor
        // for e.g:  public ExampleService(URL wsdlLocation, WebServiceFeature ... features)
        if (options.target.isLaterThan(Options.Target.V2_2)) {
            JMethod constructor4 = cls.constructor(JMod.PUBLIC);
            constructor4.param(URL.class, "wsdlLocation");
            constructor4.varParam(WebServiceFeature.class, "features");
            String constructor4Str = String.format("super(wsdlLocation, %s, features);", serviceName);
            constructor4.body().directStatement(constructor4Str);
        }

        // Generating constructor
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

        // for e.g:  public ExampleService(URL, QName, WebServiceFeature ...)
        if (options.target.isLaterThan(Options.Target.V2_2)) {
            JMethod constructor6 = cls.constructor(JMod.PUBLIC);
            constructor6.param(URL.class, "wsdlLocation");
            constructor6.param(QName.class, "serviceName");
            constructor6.varParam(WebServiceFeature.class, "features");
            constructor6.body().directStatement("super(wsdlLocation, serviceName, features);");
        }

        //@WebService
        JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class));
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

        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();
        StringBuffer statement = new StringBuffer("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);");
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

        // Generating constructor
        // for e.g:  public ExampleService(WebServiceFeature ... features)
        if (options.target.isLaterThan(Options.Target.V2_2)) {
            JMethod constructor2 = cls.constructor(JMod.PUBLIC);
            constructor2.varParam(WebServiceFeature.class, "features");
            String constructor2Str = String.format("super(__getWsdlLocation(), %s, features);", serviceName);
            constructor2.body().directStatement(constructor2Str);
        }

        // Generating constructor
View Full Code Here

Examples of com.sun.codemodel.JMethod.varParam()

        // Generating constructor
        // for e.g:  public ExampleService(URL wsdlLocation, WebServiceFeature ... features)
        if (options.target.isLaterThan(Options.Target.V2_2)) {
            JMethod constructor4 = cls.constructor(JMod.PUBLIC);
            constructor4.param(URL.class, "wsdlLocation");
            constructor4.varParam(WebServiceFeature.class, "features");
            String constructor4Str = String.format("super(wsdlLocation, %s, features);", serviceName);
            constructor4.body().directStatement(constructor4Str);
        }

        // Generating constructor
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.