Package com.sun.codemodel

Examples of com.sun.codemodel.JInvocation.arg()


       
        JBlock geBody = getEndpoint.body();
        JTryBlock tryBlock = geBody._try();
       
        JInvocation createProxy = pfVar.invoke("create");
        createProxy.arg(JExpr.direct(epVar.name()).invoke("getBinding"));
        createProxy.arg(JExpr.direct(epVar.name()).invoke("getUrl"));
       
        tryBlock.body()._return(createProxy);

        JCatchBlock catchBlock = tryBlock._catch(model.ref(MalformedURLException.class));
View Full Code Here


        JBlock geBody = getEndpoint.body();
        JTryBlock tryBlock = geBody._try();
       
        JInvocation createProxy = pfVar.invoke("create");
        createProxy.arg(JExpr.direct(epVar.name()).invoke("getBinding"));
        createProxy.arg(JExpr.direct(epVar.name()).invoke("getUrl"));
       
        tryBlock.body()._return(createProxy);

        JCatchBlock catchBlock = tryBlock._catch(model.ref(MalformedURLException.class));
        JType xreType = model._ref(XFireRuntimeException.class);
View Full Code Here

        tryBlock.body()._return(createProxy);

        JCatchBlock catchBlock = tryBlock._catch(model.ref(MalformedURLException.class));
        JType xreType = model._ref(XFireRuntimeException.class);
        JInvocation xreThrow = JExpr._new(xreType);
        xreThrow.arg("Invalid URL");
        xreThrow.arg(catchBlock.param("e"));
       
        catchBlock.body()._throw(xreThrow);
       
View Full Code Here

        JCatchBlock catchBlock = tryBlock._catch(model.ref(MalformedURLException.class));
        JType xreType = model._ref(XFireRuntimeException.class);
        JInvocation xreThrow = JExpr._new(xreType);
        xreThrow.arg("Invalid URL");
        xreThrow.arg(catchBlock.param("e"));
       
        catchBlock.body()._throw(xreThrow);
       

        /**
 
View Full Code Here

        geBody = getEndpointByName.body();
       
        // Endpoint endpoint = (Endpoint) service.getEndpoint(name);
        JType endpointType = model._ref(Endpoint.class);
        JInvocation getEndpointInv = endpointsVar.invoke("get");
        getEndpointInv.arg(JExpr.direct(epname.name()));

        epVar = geBody.decl(endpointType, "endpoint", JExpr.cast(endpointType, getEndpointInv));
       
        // if (endpoint == null)
        JBlock noEPBlock = geBody._if(JExpr.direct(epVar.name()).eq(JExpr._null()))._then();
View Full Code Here

        JBlock noEPBlock = geBody._if(JExpr.direct(epVar.name()).eq(JExpr._null()))._then();
       
        // throw IllegalStateException
        JType iseType = model._ref(IllegalStateException.class);
        JInvocation iseThrow = JExpr._new(iseType);
        iseThrow.arg("No such endpoint!");
        noEPBlock._throw(iseThrow);
       
        // return endpoint
       
        JInvocation geInvoke = JExpr.invoke(getEndpoint);
View Full Code Here

        noEPBlock._throw(iseThrow);
       
        // return endpoint
       
        JInvocation geInvoke = JExpr.invoke(getEndpoint);
        geInvoke.arg(JExpr.direct(epVar.name()));
        geBody._return(geInvoke);
       
        /**
         * Collection getEndpoints()
         */
 
View Full Code Here

        JType soapTransType = model._ref(SoapTransport.class);
        JType hashMapType = model._ref(HashMap.class);
       
        JVar tmVar = create.body().decl(tmType, "tm", JExpr.direct("org.codehaus.xfire.XFireFactory.newInstance().getXFire().getTransportManager()"));
        JInvocation asfCons = JExpr._new(asfType);
        asfCons.arg(JExpr._new(jsr181Type));
        asfCons.arg(tmVar);
        asfCons.arg(context.getSchemaGenerator().getBindingProviderExpr(context));
       
        JVar propsVar = create.body().decl(hashMapType, "props", JExpr._new(hashMapType));
        create.body().add(propsVar.invoke("put").arg("annotations.allow.interface").arg(JExpr.TRUE));
View Full Code Here

        JType hashMapType = model._ref(HashMap.class);
       
        JVar tmVar = create.body().decl(tmType, "tm", JExpr.direct("org.codehaus.xfire.XFireFactory.newInstance().getXFire().getTransportManager()"));
        JInvocation asfCons = JExpr._new(asfType);
        asfCons.arg(JExpr._new(jsr181Type));
        asfCons.arg(tmVar);
        asfCons.arg(context.getSchemaGenerator().getBindingProviderExpr(context));
       
        JVar propsVar = create.body().decl(hashMapType, "props", JExpr._new(hashMapType));
        create.body().add(propsVar.invoke("put").arg("annotations.allow.interface").arg(JExpr.TRUE));
       
View Full Code Here

       
        JVar tmVar = create.body().decl(tmType, "tm", JExpr.direct("org.codehaus.xfire.XFireFactory.newInstance().getXFire().getTransportManager()"));
        JInvocation asfCons = JExpr._new(asfType);
        asfCons.arg(JExpr._new(jsr181Type));
        asfCons.arg(tmVar);
        asfCons.arg(context.getSchemaGenerator().getBindingProviderExpr(context));
       
        JVar propsVar = create.body().decl(hashMapType, "props", JExpr._new(hashMapType));
        create.body().add(propsVar.invoke("put").arg("annotations.allow.interface").arg(JExpr.TRUE));
       
        JVar asfVar = create.body().decl(asfType, "asf", asfCons);
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.