public final class JSTypeExpression
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
JSTypeExpression(Node root,
java.lang.String sourceName) |
| Modifier and Type | Method and Description |
|---|---|
JSTypeExpression |
copy() |
boolean |
equals(java.lang.Object other) |
JSType |
evaluate(StaticTypedScope scope,
JSTypeRegistry registry)
Evaluates the type expression into a
JSType object. |
java.util.Set<java.lang.String> |
getAllTypeNames()
Returns a set of all string names in this type expression
|
com.google.common.collect.ImmutableSet<java.lang.String> |
getRecordPropertyNames()
Returns a set of keys of all record types (e.g.
|
Node |
getRoot() |
java.lang.String |
getSourceName() |
int |
hashCode() |
boolean |
isExplicitUnknownTemplateBound()
Whether this expression is an explicit unknown template bound.
|
boolean |
isOptionalArg() |
boolean |
isVarArgs() |
static JSTypeExpression |
makeOptionalArg(JSTypeExpression expr)
Make the given type expression into an optional type expression,
if possible.
|
JSTypeExpression |
replaceNamesWithUnknownType(java.util.Set<java.lang.String> names)
Replaces given names in this type expression with unknown
|
java.lang.String |
toString() |
public JSTypeExpression(Node root, java.lang.String sourceName)
public JSTypeExpression replaceNamesWithUnknownType(java.util.Set<java.lang.String> names)
public java.util.Set<java.lang.String> getAllTypeNames()
public static JSTypeExpression makeOptionalArg(JSTypeExpression expr)
public boolean isOptionalArg()
@param.public boolean isVarArgs()
@param.public JSType evaluate(StaticTypedScope scope, JSTypeRegistry registry)
JSType object.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic Node getRoot()
public java.lang.String getSourceName()
public java.lang.String toString()
toString in class java.lang.Objectpublic JSTypeExpression copy()
public boolean isExplicitUnknownTemplateBound()
public com.google.common.collect.ImmutableSet<java.lang.String> getRecordPropertyNames()
Copyright © 2009-2020 Google. All Rights Reserved.