Examples of asBoxed()


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

        Field f = (Field) member;
        f.setAccessible(true);
        try {
          if (attrType.isPrimitive()) {
            MetaClass mc = MetaClassFactory.get(attrType);
            attrType = (Class<Y>) mc.asBoxed().asClass();
          }
          return attrType.cast(f.get(entity));
        } catch (ClassCastException e) {
          throw new ClassCastException("Attribute = " + f + " value = " + f.get(entity));
        }
View Full Code Here

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

      else if (member instanceof Method) {
        Method m = (Method) member;
        m.setAccessible(true);
        if (attrType.isPrimitive()) {
          MetaClass mc = MetaClassFactory.get(attrType);
          attrType = (Class<Y>) mc.asBoxed().asClass();
        }
        return attrType.cast(m.invoke(entity));
      }
      else {
        throw new RuntimeException("Java member " + member + " isn't a field or a method! Eek!");
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();
    }

    final 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()

    final MetaClass arrayType = toMap.asArrayOf(dim);

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

    final 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()

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

    boolean read = accessType == PrivateAccessType.Read || accessType == PrivateAccessType.Both;
    boolean write = accessType == PrivateAccessType.Write || accessType == PrivateAccessType.Both;
View Full Code Here

Examples of org.jboss.errai.codegen.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.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()

        }
      }
      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.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()) {
View Full Code Here

Examples of org.jboss.errai.codegen.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
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.