Examples of decl()


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

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

            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

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

        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

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

        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

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

            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

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

        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

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

        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

Examples of com.helger.jcodemodel.JBlock.decl()

        _if._then()._return(JExpr.TRUE);
        JConditional elseif = _if._elseif(thatObject._instanceof(valueClass).not());
        elseif._then()._return(JExpr.FALSE);
        JBlock _else = elseif._else();
        AbstractJClass usedValueClassType = valueClass.narrow(valueClass.typeParams());
        JVar that = _else.decl(JMod.FINAL, usedValueClassType, nameSource.get("that"), JExpr.cast(usedValueClassType, thatObject));
        AbstractJClass visitorType = visitorInterface.narrowed(usedValueClassType, types._Boolean, types._RuntimeException);

        JDefinedClass anonymousClass1 = valueClass.owner().anonymousClass(visitorType);
        for (JMethod interfaceMethod1: visitorInterface.methods()) {
            JMethod visitorMethod1 = anonymousClass1.method(interfaceMethod1.mods().getValue() & ~JMod.ABSTRACT, types._Boolean, interfaceMethod1.name());
View Full Code Here

Examples of com.sun.codemodel.JBlock.decl()

  public void afterArgIsEvaluated(ApplyMethodContext context, JExpression functionCall, JExpression arguments,
                                  JBlock parent, JExpression argument, int index) {
    if(index == 0) {

      JBlock ifObject = parent._if(fastIsObject(argument))._then();
      JExpression genericResult = ifObject.decl(codeModel.ref(SEXP.class), "genericResult",
              codeModel.ref(S3.class).staticInvoke("tryDispatchFromPrimitive")
              .arg(context.getContext())
              .arg(context.getEnvironment())
              .arg(functionCall)
              .arg(lit(name))
View Full Code Here

Examples of com.sun.codemodel.JBlock.decl()

    final JVar varZip = unmarshalFromKMZ.body().decl(zipFileClass, "zip",JExpr._new(zipFileClass).arg(varFile) );
    final JVar varEntries = unmarshalFromKMZ.body().decl(enumerationClass.boxify().narrow(zipEntryClass.boxify().wildcard()), "entries", varZip.invoke("entries"));
    unmarshalFromKMZ.body()._if(varFile.invoke("exists").not())._then()._return(varEMPTY_KML_ARRAY);
    final JVar varKmlFiles = unmarshalFromKMZ.body().decl(arrayListClass.boxify().narrow(kmlClass.boxify()), "kmlfiles", JExpr._new(arrayListClass.boxify().narrow(kmlClass.boxify())));
    final JBlock while1 = unmarshalFromKMZ.body()._while(varEntries.invoke("hasMoreElements")).body();
    final JVar varEntry = while1.decl(zipEntryClass, "entry",JExpr.cast(zipEntryClass, varEntries.invoke("nextElement")));
    while1._if(varEntry.invoke("getName").invoke("contains").arg("__MACOSX").cor(varEntry.invoke("getName").invoke("contains").arg(".DS_STORE")))._then()._continue();
    final JVar entryName = while1.decl(stringClass, "entryName", urlDecoderClass.boxify().staticInvoke("decode").arg(varEntry.invoke("getName")).arg("UTF-8"));
    while1._if(entryName.invoke("endsWith").arg(".kml").not())._then()._continue();
    final JVar varIn = while1.decl(inputStreamClass, "in", varZip.invoke("getInputStream").arg(varEntry));
    final JVar varUnmarshal = while1.decl(kmlClass, "unmarshal", kmlClass.boxify().staticInvoke("unmarshal").arg(varIn));
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.