| Package | Description |
|---|---|
| com.google.javascript.rhino.jstype |
Provides abstractions to represent types in JavaScript.
|
| Modifier and Type | Method and Description |
|---|---|
TemplateType |
JSTypeRegistry.createTemplateType(java.lang.String name) |
TemplateType |
JSTypeRegistry.createTemplateType(java.lang.String name,
JSType bound) |
TemplateType |
JSTypeRegistry.createTemplateTypeWithTransformation(java.lang.String name,
Node expr) |
TemplateType |
JSTypeRegistry.getAsyncIterableTemplate()
Returns the template variable for the AsyncIterable interface.
|
TemplateType |
JSTypeRegistry.getAsyncIteratorValueTemplate()
Returns the template variable for the AsyncIterator interface.
|
TemplateType |
JSTypeRegistry.getGeneratorValueTemplate()
Return the value template variable for the Generator interface.
|
TemplateType |
JSTypeRegistry.getIterableTemplate() |
TemplateType |
JSTypeRegistry.getIteratorValueTemplate()
Return the value template variable for the Iterator interface.
|
TemplateType |
JSTypeRegistry.getIThenableTemplate() |
TemplateType |
JSTypeRegistry.getObjectElementKey() |
TemplateType |
JSTypeRegistry.getObjectIndexKey() |
TemplateType |
TemplateTypeMap.getTemplateTypeKeyByName(java.lang.String keyName) |
TemplateType |
JSType.toMaybeTemplateType()
Downcasts this to a TemplateType, or returns null if this is not
a function.
|
TemplateType |
ProxyObjectType.toMaybeTemplateType() |
TemplateType |
TemplateType.toMaybeTemplateType() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<TemplateType> |
FunctionType.getConstructorOnlyTemplateParameters()
Returns a list of template types present on the constructor but not on the instance.
|
com.google.common.collect.ImmutableList<TemplateType> |
TemplateTypeMap.getTemplateKeys()
Returns a list of all template keys.
|
com.google.common.collect.ImmutableList<TemplateType> |
JSType.getTypeParameters()
Return, in order, the sequence of type parameters declared for this type.
|
com.google.common.collect.ImmutableList<TemplateType> |
JSTypeRegistry.maybeGetTemplateTypesOfBuiltin(java.lang.String fnName) |
| Modifier and Type | Method and Description |
|---|---|
JSType |
TemplateTypeReplacer.caseTemplateType(TemplateType type) |
T |
Visitor.caseTemplateType(TemplateType templateType)
Template type's case.
|
T |
Visitor.WithDefaultCase.caseTemplateType(TemplateType type) |
JSType |
TemplateTypeMap.getResolvedTemplateType(TemplateType key)
Returns the JSType value associated with the specified template key.
|
boolean |
TemplateTypeMap.hasTemplateKey(TemplateType templateKey)
Returns true if this map contains the specified template key, false
otherwise.
|
boolean |
TemplateTypeMap.hasTemplateType(TemplateType key)
Returns true if there is a JSType value associated with the specified
template key; false otherwise.
|
FunctionType.Builder |
FunctionType.Builder.withTemplateKeys(TemplateType... templateKeys)
Set the template name.
|
| Modifier and Type | Method and Description |
|---|---|
TemplateTypeMap |
TemplateTypeMap.copyWithExtension(com.google.common.collect.ImmutableList<TemplateType> keys,
com.google.common.collect.ImmutableList<JSType> values)
Create a new map in which the keys and values have been extended by
keys and values respectively. |
FunctionType |
JSTypeRegistry.createConstructorType(java.lang.String name,
Node source,
Node parameters,
JSType returnType,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
boolean isAbstract)
Creates a constructor function type.
|
FunctionType |
JSTypeRegistry.createInterfaceType(java.lang.String name,
Node source,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
boolean struct)
Creates an interface function type.
|
StaticTypedScope |
JSTypeRegistry.createScopeWithTemplates(StaticTypedScope scope,
java.lang.Iterable<TemplateType> templates)
Returns a new scope that includes the given template names for type resolution
purposes.
|
TemplatizedType |
JSTypeRegistry.createTemplatizedType(ObjectType baseType,
java.util.Map<TemplateType,JSType> templatizedTypes)
Creates a templatized instance of the specified type.
|
static TemplateTypeReplacer |
TemplateTypeReplacer.forInference(JSTypeRegistry registry,
java.util.Map<TemplateType,JSType> bindings)
Creates a replacer for use during
TypeInference. |
void |
JSTypeRegistry.registerTemplateTypeNamesInScope(java.lang.Iterable<TemplateType> keys,
Node scopeRoot)
Registers template types on the given scope root.
|
FunctionType.Builder |
FunctionType.Builder.withConstructorTemplateKeys(java.lang.Iterable<TemplateType> constructorOnlyKeys)
Specifies a subset of the template keys that only apply to the constructor, and should be
removed from the instance type.
|
FunctionType.Builder |
FunctionType.Builder.withTemplateKeys(com.google.common.collect.ImmutableList<TemplateType> templateKeys)
Set the template name.
|
Copyright © 2009-2020 Google. All Rights Reserved.