Class TemplatizedType


public final class TemplatizedType extends ProxyObjectType
An object type with declared template types, such as Array<string>.
  • Method Details

    • getCtorImplementedInterfaces

      public Iterable<ObjectType> getCtorImplementedInterfaces()
      Description copied from class: ObjectType
      Gets the interfaces implemented by the ctor associated with this type. Intended to be overridden by subclasses.
      Overrides:
      getCtorImplementedInterfaces in class ProxyObjectType
    • getCtorExtendedInterfaces

      public Iterable<ObjectType> getCtorExtendedInterfaces()
      Description copied from class: ObjectType
      Gets the interfaces extended by the interface associated with this type. Intended to be overridden by subclasses.
      Overrides:
      getCtorExtendedInterfaces in class ProxyObjectType
    • visit

      public <T> T visit(Visitor<T> visitor)
      Description copied from class: JSType
      Visit this type with the given visitor.
      Overrides:
      visit in class ProxyObjectType
      Returns:
      the value returned by the visitor
      See Also:
    • toMaybeTemplatizedType

      public TemplatizedType toMaybeTemplatizedType()
      Description copied from class: JSType
      Downcasts this to a TemplatizedType, or returns null if this is not a templatized type.
      Overrides:
      toMaybeTemplatizedType in class ProxyObjectType
    • getTemplateTypes

      public com.google.common.collect.ImmutableList<JSType> getTemplateTypes()
      Description copied from class: ObjectType
      Gets the declared default element type.
      Overrides:
      getTemplateTypes in class ProxyObjectType
      See Also:
    • getPropertyType

      public @Nullable JSType getPropertyType(Property.Key propertyName)
      Description copied from class: ObjectType
      Gets the property type of the property whose name is given. If the underlying object does not have this property, the Unknown type is returned to indicate that no information is available on this property.

      This gets overridden by FunctionType for lazily-resolved call() and bind() functions.

      Overrides:
      getPropertyType in class ObjectType
      Returns:
      the property's type or UnknownType. This method never returns null.
    • getTemplateTypeMap

      public TemplateTypeMap getTemplateTypeMap()
      Description copied from class: JSType
      Returns the template type map associated with this type.
      Overrides:
      getTemplateTypeMap in class ProxyObjectType
    • hasAnyTemplateTypesInternal

      public boolean hasAnyTemplateTypesInternal()
      Overrides:
      hasAnyTemplateTypesInternal in class ProxyObjectType
    • getReferencedType

      public ObjectType getReferencedType()
      Returns:
      The referenced ObjectType wrapped by this TemplatizedType.