Examples of JInterfaceType


Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

      name = intern(name);
      JDeclaredType type;
      if (binding.isClass()) {
        type = new JClassType(info, name, binding.isAbstract(), binding.isFinal());
      } else if (binding.isInterface() || binding.isAnnotationType()) {
        type = new JInterfaceType(info, name);
      } else if (binding.isEnum()) {
        if (binding.isAnonymousType()) {
          // Don't model an enum subclass as a JEnumType.
          type = new JClassType(info, name, false, true);
        } else {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

      }

      ReferenceBinding[] superInterfaces = binding.superInterfaces();
      for (ReferenceBinding superInterfaceBinding : superInterfaces) {
        assert (superInterfaceBinding.isInterface());
        JInterfaceType superInterface = (JInterfaceType) typeMap.get(superInterfaceBinding);
        type.addImplements(superInterface);
      }

      ReferenceBinding enclosingBinding = binding.enclosingType();
      if (enclosingBinding != null) {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

    String name = GwtAstBuilder.dotify(binding.compoundName);
    SourceInfo info = SourceOrigin.UNKNOWN;
    if (binding.isClass()) {
      return new JClassType(info, name, binding.isAbstract(), binding.isFinal());
    } else if (binding.isInterface() || binding.isAnnotationType()) {
      return new JInterfaceType(info, name);
    } else if (binding.isEnum()) {
      if (binding.isAnonymousType()) {
        // Don't model an enum subclass as a JEnumType.
        return new JClassType(info, name, false, true);
      } else {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

    }

    private JInterfaceType getOrCreateExternalType(SourceInfo info,
        char[][] compoundName) {
      String name = BuildTypeMap.dotify(compoundName);
      JInterfaceType external = (JInterfaceType) program.getFromTypeMap(name);
      if (external == null) {
        external = program.createInterface(info, name);
        external.setExternal(true);
      }
      return external;
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

        return toReturn;

      } else if (value instanceof AnnotationBinding) {
        AnnotationBinding annotationBinding = (AnnotationBinding) value;
        ReferenceBinding annotationType = annotationBinding.getAnnotationType();
        JInterfaceType type = (JInterfaceType) typeMap.tryGet(annotationType);
        JAnnotation toReturn;
        if (type != null) {
          toReturn = new JAnnotation(info, type);
        } else {
          JInterfaceType external = getOrCreateExternalType(info,
              annotationType.compoundName);
          toReturn = new JAnnotation(info, external);
        }

        // Load the properties for the annotation value
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

          }
        }
        if (!record) {
          continue;
        }
        JInterfaceType annotationType = (JInterfaceType) typeMap.tryGet(binding);
        if (annotationType != null) {
          annotation = new JAnnotation(x.getSourceInfo(), annotationType);
        } else {
          // Indicates a binary-only annotation type
          JInterfaceType externalType = getOrCreateExternalType(
              x.getSourceInfo(), binding.compoundName);
          annotation = new JAnnotation(x.getSourceInfo(), externalType);
        }
        processAnnotationProperties(x.getSourceInfo(), annotation,
            a.computeElementValuePairs());
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

      if (binding.isClass()) {
        type = new JClassType(info, name, binding.isAbstract(), binding.isFinal(), interopType);
        JsInteropUtil.maybeSetJsPrototypeFlag(x, (JClassType) type);
      } else if (binding.isInterface() || binding.isAnnotationType()) {
        type = new JInterfaceType(info, name, interopType, jsPrototype);
      } else if (binding.isEnum()) {
        if (binding.isAnonymousType()) {
          // Don't model an enum subclass as a JEnumType.
          type = new JClassType(info, name, false, true, interopType);
        } else {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

      }

      ReferenceBinding[] superInterfaces = binding.superInterfaces();
      for (ReferenceBinding superInterfaceBinding : superInterfaces) {
        assert (superInterfaceBinding.isInterface());
        JInterfaceType superInterface = (JInterfaceType) typeMap.get(superInterfaceBinding);
        type.addImplements(superInterface);
      }

      ReferenceBinding enclosingBinding = binding.enclosingType();
      if (enclosingBinding != null) {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

      JLiteral typeId = getRuntimeTypeReference(x);
      JClassType superClass = x.getSuperClass();
      JLiteral superTypeId = (superClass == null) ? JNullLiteral.INSTANCE :
          getRuntimeTypeReference(x.getSuperClass());
      // check if there's an overriding prototype
      JInterfaceType jsPrototypeIntf = JProgram.maybeGetJsTypeFromPrototype(superClass);
      String jsPrototype = jsPrototypeIntf != null ? jsPrototypeIntf.getJsPrototype() : null;
      // choose appropriate setup function
      JsName defineClassRef = indexedFunctions.get(
          jsPrototype == null ? "JavaClassHierarchySetupUtil.defineClass" :
              "JavaClassHierarchySetupUtil.defineClassWithPrototype").getName();
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JInterfaceType

    // @Override
    public void endVisit(JClassType x, Context ctx) {
      for (JClassType cur = x; cur != null; cur = cur.extnds) {
        addImplementor(cur, x);
        for (Iterator it = cur.implments.iterator(); it.hasNext();) {
          JInterfaceType implment = (JInterfaceType) it.next();
          addImplementor(implment, x);
        }
      }
    }
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.