Examples of JGenericType


Examples of com.google.gwt.core.ext.typeinfo.JGenericType

  /**
   * Returns the subtype of UserPreferencesaccepted by a Gadget.
   */
  static JClassType getUserPrefsType(TreeLogger logger, TypeOracle typeOracle,
      JClassType extendsGadget) throws UnableToCompleteException {
    JGenericType gadgetType = typeOracle.findType(Gadget.class.getName()).isGenericType();
    assert gadgetType != null;

    JParameterizedType paramType = null;

    while (true) {
      paramType = extendsGadget.isParameterized();

      if (paramType != null && gadgetType.equals(paramType.getBaseType())) {
        break;
      }

      extendsGadget = extendsGadget.getSuperclass();

View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

  /**
   * Returns the subtype of UserPreferencesaccepted by a Gadget.
   */
  static JClassType getUserPrefsType(TreeLogger logger, TypeOracle typeOracle,
      JClassType extendsGadget) throws UnableToCompleteException {
    JGenericType gadgetType = typeOracle.findType(Gadget.class.getName()).isGenericType();
    assert gadgetType != null;

    JParameterizedType paramType = null;

    while (true) {
      paramType = extendsGadget.isParameterized();

      if (paramType != null && gadgetType.equals(paramType.getBaseType())) {
        break;
      }

      extendsGadget = extendsGadget.getSuperclass();

View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

   * @param type
   * @return original type or its raw type if it is generic
   */
  private static JType possiblySubstituteRawType(JType type) {
    if (type != null) {
      JGenericType genericType = type.isGenericType();
      if (genericType != null) {
        type = genericType.getRawType();
      }
    }
    return type;
  }
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

          isLocalType, className, isIntf);
    } else {
      JTypeParameter[] typeParams = getTypeParametersForClass(classData);
      if ((typeParams != null && typeParams.length > 0)
          || nonStaticInsideGeneric(classData, enclosingClassData)) {
        resultType = new JGenericType(typeOracle, pkg, enclosingTypeName,
            isLocalType, className, isIntf, typeParams);
      } else {
        resultType = new JRealClassType(typeOracle, pkg, enclosingTypeName,
            isLocalType, className, isIntf);
      }
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

        if (enclosingType.isGenericType() != null
            && (classData.getAccess() & (Opcodes.ACC_STATIC | Opcodes.ACC_INTERFACE)) != 0) {
          // If the inner class doesn't have access to it's enclosing type's
          // type variables, the enclosign type must be the raw type instead
          // of the generic type.
          JGenericType genericType = enclosingType.isGenericType();
          type.setEnclosingType(genericType.getRawType());
        } else {
          type.setEnclosingType(enclosingType);
        }
      }
    }
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

    JArrayType typeArgAsArray = typeArg.isArray();
    if (typeArgAsArray != null) {
      JTypeParameter parameterOfTypeArgArray = typeArgAsArray.getLeafType().isTypeParameter();
      if (parameterOfTypeArgArray != null) {
        JGenericType declaringClass = parameterOfTypeArgArray.getDeclaringClass();
        if (declaringClass != null) {
          TypeParameterFlowInfo flowInfoForArrayParam = getFlowInfo(
              declaringClass, parameterOfTypeArgArray.getOrdinal());
          TypeParameterFlowInfo otherFlowInfo = getFlowInfo(baseType,
              paramIndex);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

      if (maybeInstantiable(logger, subtypeBase, problems)) {
        /*
         * Convert the generic type into a parameterization that only includes
         * wildcards.
         */
        JGenericType isGeneric = subtype.isGenericType();
        if (isGeneric != null) {
          subtype = isGeneric.asParameterizedByWildcards();
        } else {
          assert (subtype instanceof JRealClassType);
        }

        possiblyInstantiableTypes.add(subtype);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

    JArrayType typeArgAsArray = typeArg.isArray();
    if (typeArgAsArray != null) {
      JTypeParameter parameterOfTypeArgArray = typeArgAsArray.getLeafType().isTypeParameter();
      if (parameterOfTypeArgArray != null) {
        JGenericType declaringClass = parameterOfTypeArgArray.getDeclaringClass();
        if (declaringClass != null) {
          TypeParameterFlowInfo flowInfoForArrayParam = getFlowInfo(
              declaringClass, parameterOfTypeArgArray.getOrdinal());
          TypeParameterFlowInfo otherFlowInfo = getFlowInfo(baseType,
              paramIndex);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

      if (maybeInstantiable(logger, subtypeBase, problems)) {
        /*
         * Convert the generic type into a parameterization that only includes
         * wildcards.
         */
        JGenericType isGeneric = subtype.isGenericType();
        if (isGeneric != null) {
          subtype = isGeneric.asParameterizedByWildcards();
        } else {
          assert (subtype instanceof JRealClassType);
        }

        possiblyInstantiableTypes.add(subtype);
View Full Code Here

Examples of com.google.gwt.core.ext.typeinfo.JGenericType

    {
    if (eventClassType == null)
    {
      return null;
    }
    JGenericType genericType = eventClassType.isGenericType();
    if (genericType == null)
    {
      return JClassUtils.getMethod(controllerClass, methodName, new JType[]{eventClassType});
    }
    else
    {
      eventClassType = genericType.getRawType();
      JClassType superClass = controllerClass;
      while (superClass.getSuperclass() != null)
      {
        JMethod[] methods = superClass.getMethods();
        if (methods != null)
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.