Examples of asParameterizationOf()


Examples of com.google.gwt.core.ext.typeinfo.JClassType.asParameterizationOf()

            } else if (prop.getType() instanceof JClassType &&
                    ((JClassType) prop.getType()).isAssignableTo(
                        this.collectionType)) {
                // get the parameter type
                JClassType propType = (JClassType) prop.getType();
                JType paramType = propType.asParameterizationOf((JGenericType) this.collectionType)
                                          .getTypeArgs()[0];
                writer.println("JSONArray array = root.get(\"" + fieldName +
                    "\").isArray();");
                writer.println(propType.getParameterizedQualifiedSourceName() +
                    " col = " + this.newCollectionExpression(propType) + ";");
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.asParameterizationOf()

                if ((classType != null) &&
                        (classType.isAssignableTo(this.collectionType)) ||
                        arrayType != null) {
                    JType subType = (arrayType != null)
                        ? arrayType.getComponentType()
                        : classType.asParameterizationOf(this.collectionType.isGenericType())
                                   .getTypeArgs()[0];
                    writer.println();
                    writer.println(" if( source." +
                        prop.getReadMethod().getBaseMethod().getName() +
                        "() == null ){");
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.asParameterizationOf()

    Map<JTypeParameter, JClassType> constraints = new HashMap<JTypeParameter, JClassType>();
    JClassType subWithWildcardsReplaced = replaceWildcardsWithFreshTypeVariables(
        subType, constraints);

    // Rewrite subType so that it has the same base type as superType.
    JParameterizedType subAsParameterized = subWithWildcardsReplaced.asParameterizationOf(superAsParameterized.getBaseType());
    if (subAsParameterized == null) {
      // The subtype's base does not inherit from the supertype's base,
      // so again no constraint will be possible.
      return subType;
    }
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.asParameterizationOf()

    Map<JTypeParameter, JClassType> constraints = new HashMap<JTypeParameter, JClassType>();
    JClassType subWithWildcardsReplaced = replaceWildcardsWithFreshTypeVariables(
        subType, constraints);

    // Rewrite subType so that it has the same base type as superType.
    JParameterizedType subAsParameterized = subWithWildcardsReplaced.asParameterizationOf(superAsParameterized.getBaseType());
    if (subAsParameterized == null) {
      // The subtype's base does not inherit from the supertype's base,
      // so again no constraint will be possible.
      return subType;
    }
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JClassType.asParameterizationOf()

    Map<JTypeParameter, JClassType> constraints = new HashMap<JTypeParameter, JClassType>();
    JClassType subWithWildcardsReplaced = replaceWildcardsWithFreshTypeVariables(
        subType, constraints);

    // Rewrite subType so that it has the same base type as superType.
    JParameterizedType subAsParameterized = subWithWildcardsReplaced.asParameterizationOf(superAsParameterized.getBaseType());
    if (subAsParameterized == null) {
      // The subtype's base does not inherit from the supertype's base,
      // so again no constraint will be possible.
      return subType;
    }
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.