Package com.envoisolutions.sxc.builder

Examples of com.envoisolutions.sxc.builder.CodeBody.decl()


        }
       
        CodeBody body = xpathBuilder.getBody();
       
        // grab the event handler out of the context
        JVar handlerVar = body.decl(eventHandlerType, varName,
                                    JExpr.cast(eventHandlerType,
                                               JExpr._super().ref("context").invoke("get").arg(varName)));

        body.add(handlerVar.invoke("onMatch").arg(JExpr._new(eventType).arg(JExpr.lit(expr)).arg(xpathBuilder.getXSR())));
    }
View Full Code Here


            CodeBody cb = enumBuilder.getBody();
           
            JType type = model._ref(cls);
            JType jaxbElementType = model._ref(JAXBElement.class);
            JType qnameType = model._ref(QName.class);
            JVar qname = cb.decl(qnameType, "_xname", JExpr.direct("reader").invoke("getName"));
           
            enumBuilder.getBody()._return(jaxbElementType,
                                          JExpr._new(jaxbElementType)
                                          .arg(qname).arg(JExpr.dotclass((JClass) type))
                                          .arg(toSet));
View Full Code Here

        CodeBody cb = elBuilder.getBody();
       
        JType type = model._ref(c);
        JType jaxbElementType = model._ref(JAXBElement.class);
        JType qnameType = model._ref(QName.class);
        JVar qname = cb.decl(qnameType, "_xname", JExpr.direct("reader").invoke("getName"));
       
        elBuilder.getBody()._return(jaxbElementType,
                                    JExpr._new(jaxbElementType)
                                    .arg(qname).arg(JExpr.dotclass((JClass) type))
                                    .arg(expression));
View Full Code Here

        JType type = model._ref(cls);
       
        JBlock xsiNilReturnBlock = body.getBlock()._if(JExpr.direct("reader").invoke("isXsiNil"))._then();

        // Method factoryMethod = info.getFactoryMethod();
        JVar var = body.decl(type, info.getClazz().getSimpleName(), JExpr._new(type));
        if (wrap) {
            JType jaxbElementType = model._ref(JAXBElement.class);
            JType qnameType = model._ref(QName.class);
            JVar qname = body.getBlock().decl(qnameType, "_xname", JExpr.direct("reader").invoke("getName"));
            body._return(jaxbElementType,
View Full Code Here

            CodeBody cb = enumBuilder.getBody();
           
            JType type = model._ref(cls);
            JType jaxbElementType = model._ref(JAXBElement.class);
            JType qnameType = model._ref(QName.class);
            JVar qname = cb.decl(qnameType, "_xname", JExpr.direct("reader").invoke("getName"));
           
            enumBuilder.getBody()._return(jaxbElementType,
                                          JExpr._new(jaxbElementType)
                                          .arg(qname).arg(JExpr.dotclass((JClass) type))
                                          .arg(toSet));
View Full Code Here

        CodeBody cb = elBuilder.getBody();
       
        JType type = model._ref(c);
        JType jaxbElementType = model._ref(JAXBElement.class);
        JType qnameType = model._ref(QName.class);
        JVar qname = cb.decl(qnameType, "_xname", JExpr.direct("reader").invoke("getName"));
       
        elBuilder.getBody()._return(jaxbElementType,
                                    JExpr._new(jaxbElementType)
                                    .arg(qname).arg(JExpr.dotclass((JClass) type))
                                    .arg(expression));
View Full Code Here

        JType type = model._ref(cls);
       
        JBlock xsiNilReturnBlock = body.getBlock()._if(JExpr.direct("reader").invoke("isXsiNil"))._then();

        // Method factoryMethod = info.getFactoryMethod();
        JVar var = body.decl(type, info.getClazz().getSimpleName(), JExpr._new(type));
        if (wrap) {
            JType jaxbElementType = model._ref(JAXBElement.class);
            JType qnameType = model._ref(QName.class);
            JVar qname = body.getBlock().decl(qnameType, "_xname", JExpr.direct("reader").invoke("getName"));
            body._return(jaxbElementType,
View Full Code Here

        }
       
        CodeBody body = xpathBuilder.getBody();
       
        // grab the event handler out of the context
        JVar handlerVar = body.decl(eventHandlerType, varName,
                                    JExpr.cast(eventHandlerType,
                                               JExpr._super().ref("context").invoke("get").arg(varName)));

        body.add(handlerVar.invoke("onMatch").arg(JExpr._new(eventType).arg(JExpr.lit(expr)).arg(xpathBuilder.getXSR())));
    }
View Full Code Here

        }
       
        CodeBody body = xpathBuilder.getBody();
       
        // grab the event handler out of the context
        JVar handlerVar = body.decl(eventHandlerType, varName,
                                    JExpr.cast(eventHandlerType,
                                               JExpr.direct("context").invoke("get").arg(varName)));

        body.add(handlerVar.invoke("onMatch").arg(JExpr._new(eventType).arg(JExpr.lit(expr)).arg(xpathBuilder.getXSR())));
    }
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.