Examples of asBoxed()


Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()

    final MetaClass arrayType = toMap.asArrayOf(dim);

    MetaClass outerType = toMap.getOuterComponentType();
    if (!outerType.isArray() && outerType.isPrimitive()) {
      outerType = outerType.asBoxed();
    }

    Statement demarshallerStatement =
            Stmt.loadVariable(getVarName(outerType)).invoke("demarshall", loadVariable("a0")
                    .invoke("get", loadVariable("i")), Stmt.loadVariable("a1"));
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()


  public static void addPrivateAccessStubs(boolean useJSNIStubs, ClassStructureBuilder<?> classBuilder, MetaField f) {
    MetaClass type = f.getType();
    if (type.getCanonicalName().equals("long")) {
      type = type.asBoxed();
    }

    if (useJSNIStubs) {
      classBuilder.privateMethod(void.class, getPrivateFieldInjectorName(f))
              .parameters(DefParameters.fromParameters(Parameter.of(f.getDeclaringClass(), "instance"),
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()

    }

    if (useJSNIStubs) {
      classBuilder.privateMethod(void.class, getPrivateFieldInjectorName(f))
              .parameters(DefParameters.fromParameters(Parameter.of(f.getDeclaringClass(), "instance"),
                      Parameter.of(type.isArray() ? type.asBoxed() : type, "value")))
              .modifiers(Modifier.Static, Modifier.JSNI)
              .body()
              .append(new StringStatement(JSNIUtil.fieldAccess(f) + " = value"))
              .finish();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()


  public static void addPrivateAccessStubs(boolean useJSNIStubs, ClassStructureBuilder<?> classBuilder, MetaField f) {
    MetaClass type = f.getType();
    if (type.getCanonicalName().equals("long")) {
      type = type.asBoxed();
    }

    if (useJSNIStubs) {
      classBuilder.privateMethod(void.class, getPrivateFieldInjectorName(f))
              .parameters(DefParameters.fromParameters(Parameter.of(f.getDeclaringClass(), "instance"),
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()

    }

    if (useJSNIStubs) {
      classBuilder.privateMethod(void.class, getPrivateFieldInjectorName(f))
              .parameters(DefParameters.fromParameters(Parameter.of(f.getDeclaringClass(), "instance"),
                      Parameter.of(type.isArray() ? type.asBoxed() : type, "value")))
              .modifiers(Modifier.Static, Modifier.JSNI)
              .body()
              .append(new StringStatement(JSNIUtil.fieldAccess(f) + " = value"))
              .finish();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()


  public static void addPrivateAccessStubs(boolean useJSNIStubs, ClassStructureBuilder<?> classBuilder, MetaField f) {
    MetaClass type = f.getType();
    if (type.getCanonicalName().equals("long")) {
      type = type.asBoxed();
    }

    if (useJSNIStubs) {
      classBuilder.privateMethod(void.class, getPrivateFieldInjectorName(f))
              .parameters(DefParameters.fromParameters(Parameter.of(f.getDeclaringClass(), "instance"),
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()

              }
            }
            else if (actualParamType.equals(arguments[i])) {
              score += 7;
            }
            else if (actualParamType.isPrimitive() && actualParamType.asBoxed().equals(arguments[i])) {
              score += 6;
            }
            else if (arguments[i].isPrimitive() && arguments[i].asUnboxed().equals(actualParamType)) {
              score += 6;
            }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.MetaClass.asBoxed()

              score += 5;
            }
            else if (isNumericallyCoercible(arguments[i], actualParamType)) {
              score += 4;
            }
            else if (actualParamType.asBoxed().isAssignableFrom(arguments[i].asBoxed())
                    && !Object_MetaClass.equals(arguments[i])) {
              score += 3 + scoreInterface(actualParamType, arguments[i]);
            }
            else if (canConvert(actualParamType, arguments[i])) {
              if (actualParamType.isArray() && arguments[i].isArray()) score += 1;
View Full Code Here

Examples of org.jboss.errai.codegen.meta.MetaClass.asBoxed()

    final MetaClass arrayType = toMap.asArrayOf(dim);

    MetaClass outerType = toMap.getOuterComponentType();
    if (!outerType.isArray() && outerType.isPrimitive()) {
      outerType = outerType.asBoxed();
    }

    Statement demarshallerStatement =
            Stmt.loadVariable(getVarName(outerType)).invoke("demarshall", loadVariable("a0")
                    .invoke("get", loadVariable("i")), Stmt.loadVariable("a1"));
View Full Code Here

Examples of org.jboss.errai.codegen.meta.MetaClass.asBoxed()

                      Stmt.castTo(HasValue.class, Stmt.loadVariable("widget")).invoke(
                          "setValue",
                          Stmt.invokeStatic(Convert.class, "toWidgetValue",
                              Variable.get("widget"),
                              paramType.asBoxed().asClass(),
                              Stmt.castTo(paramType.asBoxed(), Stmt.loadVariable(property)),
                              field("converters").invoke("get", property)),
                          true))
                  .finish()
                  .elseif_(
                      Bool.instanceOf(Variable.get("widget"), HasText.class))
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.