Package org.jboss.errai.codegen.meta

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


                      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

                      Stmt.castTo(HasText.class, Stmt.loadVariable("widget"))
                          .invoke(
                              "setText",
                              Stmt.castTo(String.class,
                                  Stmt.invokeStatic(Convert.class, "toWidgetValue", String.class,
                                      paramType.asBoxed().asClass(),
                                      Stmt.castTo(paramType.asBoxed(), Stmt.loadVariable(property)),
                                      field("converters").invoke("get", property)
                                      )
                                  )
                          )
View Full Code Here

                          .invoke(
                              "setText",
                              Stmt.castTo(String.class,
                                  Stmt.invokeStatic(Convert.class, "toWidgetValue", String.class,
                                      paramType.asBoxed().asClass(),
                                      Stmt.castTo(paramType.asBoxed(), Stmt.loadVariable(property)),
                                      field("converters").invoke("get", property)
                                      )
                                  )
                          )
                  )
View Full Code Here

                  .append(
                      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_(
View Full Code Here

                  .append(
                      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)),
                              Stmt.loadVariable("converters").invoke("get", property)),
                          true))
                  .finish()
                  .elseif_(
View Full Code Here

                      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)),
                              Stmt.loadVariable("converters").invoke("get", property)),
                          true))
                  .finish()
                  .elseif_(
                      Bool.instanceOf(Variable.get("widget"), HasText.class))
View Full Code Here

                      Stmt.castTo(HasText.class, Stmt.loadVariable("widget"))
                          .invoke(
                              "setText",
                              Stmt.castTo(String.class,
                                  Stmt.invokeStatic(Convert.class, "toWidgetValue", String.class,
                                      paramType.asBoxed().asClass(),
                                      Stmt.castTo(paramType.asBoxed(), Stmt.loadVariable(property)),
                                      Stmt.loadVariable("converters").invoke("get", property)
                                      )
                                  )
                          )
View Full Code Here

                          .invoke(
                              "setText",
                              Stmt.castTo(String.class,
                                  Stmt.invokeStatic(Convert.class, "toWidgetValue", String.class,
                                      paramType.asBoxed().asClass(),
                                      Stmt.castTo(paramType.asBoxed(), Stmt.loadVariable(property)),
                                      Stmt.loadVariable("converters").invoke("get", property)
                                      )
                                  )
                          )
                  )
View Full Code Here

        }
      }
      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

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.