Examples of toObjectType()


Examples of com.google.javascript.rhino.jstype.JSType.toObjectType()

        JSType type = n.getFirstChild().getJSType();
        if (type == null || type.toObjectType() == null) {
          // Note cases like <primitive>.field
          return;
        }
        removeProperty(type.toObjectType(), propName);
      }
      if (n.getJSDocInfo() != null) {
        n.getJSDocInfo().setAssociatedNode(null);
      }
    }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.JSType.toObjectType()

      }
    }

    String qualifiedName = n.getQualifiedName();
    if (type.isFunctionPrototypeType() ||
        (type.toObjectType() != null &&
         type.toObjectType().getConstructor() != null)) {
      return type.toString();
    } else if (qualifiedName != null) {
      return qualifiedName;
    } else if (type.isFunctionType()) {
View Full Code Here

Examples of com.google.javascript.rhino.jstype.JSType.toObjectType()

    }

    String qualifiedName = n.getQualifiedName();
    if (type.isFunctionPrototypeType() ||
        (type.toObjectType() != null &&
         type.toObjectType().getConstructor() != null)) {
      return type.toString();
    } else if (qualifiedName != null) {
      return qualifiedName;
    } else if (type.isFunctionType()) {
      // Don't show complex function names.
View Full Code Here

Examples of com.google.javascript.rhino.jstype.JSType.toObjectType()

      Set<JSType> types = Sets.newHashSet();
      JSType skipType = type;
      while (skipType != null) {
        types.add(skipType);

        ObjectType objSkipType = skipType.toObjectType();
        if (objSkipType != null) {
          skipType = objSkipType.getImplicitPrototype();
        } else {
          break;
        }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.JSType.toObjectType()

    if (existingType != null) {
      boolean isInstanceObject = existingType.isInstanceType();
      if (isInstanceObject || fnName.equals("Function")) {
        FunctionType existingFn =
            isInstanceObject ?
            existingType.toObjectType().getConstructor() :
            typeRegistry.getNativeFunctionType(FUNCTION_FUNCTION_TYPE);

        if (existingFn.getSource() == null) {
          existingFn.setSource(sourceNode);
        }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.JSType.toObjectType()

        break;

      case Token.OBJECTLIT:
        if ((expr.getJSType() != null) && !expr.getJSType().isUnknownType()) {
          JSType exprType = expr.getJSType().restrictByNotNullOrUndefined();
          ConcreteType inst = createConcreteInstance(exprType.toObjectType());
          allInstantiatedTypes.add(inst);
          ret = inst;
        } else {
          ret = ConcreteType.ALL;
        }
View Full Code Here

Examples of org.cojen.classfile.TypeDesc.toObjectType()

                    switch (methodType) {
                    case READ_METHOD: case TRY_READ_METHOD: default: {
                        b.loadLocal(beanVar);
                        b.invoke(bp.getReadMethod());
                        TypeDesc type = TypeDesc.forClass(bp.getType());
                        b.convert(type, type.toObjectType());
                        b.returnValue(TypeDesc.OBJECT);
                        break;
                    }
                    case WRITE_METHOD: case TRY_WRITE_METHOD: {
                        b.loadLocal(beanVar);
View Full Code Here

Examples of org.cojen.classfile.TypeDesc.toObjectType()

                    }
                    case WRITE_METHOD: case TRY_WRITE_METHOD: {
                        b.loadLocal(beanVar);
                        b.loadLocal(valueVar);
                        TypeDesc type = TypeDesc.forClass(bp.getType());
                        b.checkCast(type.toObjectType());
                        b.convert(type.toObjectType(), type);
                        b.invoke(bp.getWriteMethod());
                        if (methodType == WRITE_METHOD) {
                            b.returnVoid();
                        } else {
View Full Code Here

Examples of org.cojen.classfile.TypeDesc.toObjectType()

                    case WRITE_METHOD: case TRY_WRITE_METHOD: {
                        b.loadLocal(beanVar);
                        b.loadLocal(valueVar);
                        TypeDesc type = TypeDesc.forClass(bp.getType());
                        b.checkCast(type.toObjectType());
                        b.convert(type.toObjectType(), type);
                        b.invoke(bp.getWriteMethod());
                        if (methodType == WRITE_METHOD) {
                            b.returnVoid();
                        } else {
                            b.loadConstant(true);
View Full Code Here

Examples of org.cojen.classfile.TypeDesc.toObjectType()

                builder.loadThis();
                builder.loadField("mUsingComparators", comparatorArrayType);
                builder.loadConstant(i);
                builder.loadFromArray(TypeDesc.forClass(Comparator.class));
                builder.loadLocal(p1);
                builder.convert(propertyType, propertyType.toObjectType());
                builder.loadLocal(p2);
                builder.convert(propertyType, propertyType.toObjectType());
                builder.invoke(compareMethod);
            } else {
                // If case-sensitive is off and a collator is provided and
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.