Esempio n. 1
0
 /**
  * Creates an object type, allowing specification of the implicit prototype when creating native
  * objects.
  */
 PrototypeObjectType(
     JSTypeRegistry registry, String className, ObjectType implicitPrototype, boolean nativeType) {
   super(registry);
   this.properties = Maps.newTreeMap();
   this.className = className;
   this.nativeType = nativeType;
   if (nativeType || implicitPrototype != null) {
     setImplicitPrototype(implicitPrototype);
   } else {
     setImplicitPrototype(registry.getNativeObjectType(JSTypeNative.OBJECT_TYPE));
   }
 }
  /**
   * Creates an object type, allowing specification of the implicit prototype, whether the object is
   * native, and any templatized types.
   */
  PrototypeObjectType(
      JSTypeRegistry registry,
      String className,
      ObjectType implicitPrototype,
      boolean nativeType,
      TemplateTypeMap templateTypeMap,
      boolean anonymousType) {
    super(registry, templateTypeMap);
    this.properties = new PropertyMap();
    this.properties.setParentSource(this);

    this.className = className;
    this.nativeType = nativeType;
    this.anonymousType = anonymousType;
    if (nativeType || implicitPrototype != null) {
      setImplicitPrototype(implicitPrototype);
    } else {
      setImplicitPrototype(registry.getNativeObjectType(JSTypeNative.OBJECT_TYPE));
    }
  }