Package com.google.gwt.dev.javac.typemodel

Examples of com.google.gwt.dev.javac.typemodel.JClassType


        if (actual != expected) {
          throw new IllegalStateException("Incorrect # of type parameters to "
              + genericType.getQualifiedBinaryName() + ": expected " + expected
              + ", actual=" + actual);
        }
        JClassType genericEnc = genericType.getEnclosingType();
        if (outer == null && genericEnc != null) {
          // Sometimes the signature is like Foo$Bar<H> even if Foo is a
          // generic class. The cases I have seen are where Foo's type
          // parameter is also named H and has the same bounds. That
          // manifests itself as getting visitClassType("Foo$Bar") and
          // then VisitTypeArgument/etc, rather than the usual
          // visitClassType("Foo"), visitTypeArgument/etc,
          // visitInnerClass("Bar"), visitTypeArgument/etc.
          //
          // So, in this case we have to build our own chain of enclosing
          // classes here, properly parameterizing any generics along the
          // way.
          // TODO(jat): more testing to validate this assumption
          JClassType[] outerArgs = null;
          JGenericType genericEncGeneric = genericEnc.isGenericType();
          if (genericEncGeneric != null) {
            JTypeParameter[] encTypeParams = genericEncGeneric.getTypeParameters();
            int n = encTypeParams.length;
            outerArgs = new JClassType[n];
            for (int i = 0; i < n; ++i) {
View Full Code Here


      // Set the super type for non-interfaces
      if ((access & Opcodes.ACC_INTERFACE) == 0) {
        String superInternalName = classData.getSuperInternalName();
        assert Name.isInternalName(superInternalName);
        if (superInternalName != null) {
          JClassType superType = findByInternalName(superInternalName);
          if (superType == null || !resolveClass(logger, superType, context)) {
            logger.log(TreeLogger.WARN, "Unable to resolve supertype " + superInternalName);
            return false;
          }
          setSuperClass(unresolvedType, (JClassType) possiblySubstituteRawType(superType));
        }
      }

      // Set interfaces
      for (String interfaceInternalName : classData.getInterfaceInternalNames()) {
        JClassType interfaceType = findByInternalName(interfaceInternalName);
        if (interfaceType == null || !resolveClass(logger, interfaceType, context)) {
          logger.log(TreeLogger.WARN, "Unable to resolve interface " + interfaceInternalName);
          return false;
        }
        addImplementedInterface(
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.javac.typemodel.JClassType

Copyright © 2018 www.massapicom. 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.