static class FunctionTypeBuilder.AstFunctionContents extends java.lang.Object implements FunctionTypeBuilder.FunctionContents
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.Multiset<java.lang.String> |
assignedVarNames |
private java.util.Set<java.lang.String> |
escapedQualifiedNames |
private java.util.Set<java.lang.String> |
escapedVarNames |
private boolean |
hasNonEmptyReturns |
private Node |
n |
Constructor and Description |
---|
AstFunctionContents(Node n) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.Multiset<java.lang.String> |
getAssignedNameCounts()
Gets the number of times each variable has been assigned.
|
java.util.Set<java.lang.String> |
getEscapedQualifiedNames()
Gets a list of variables whose properties are escaped.
|
java.lang.Iterable<java.lang.String> |
getEscapedVarNames()
Gets a list of variables in this scope that are escaped.
|
Node |
getSourceNode()
Returns the source node of this function.
|
boolean |
mayBeFromExterns()
Returns if the function may be in externs.
|
boolean |
mayHaveNonEmptyReturns()
Returns if a return of a real value (not undefined) appears.
|
boolean |
mayHaveSingleThrow()
Returns if this consists of a single throw.
|
(package private) void |
recordAssignedName(java.lang.String name) |
(package private) void |
recordEscapedQualifiedName(java.lang.String name) |
(package private) void |
recordEscapedVarName(java.lang.String name) |
(package private) void |
recordNonEmptyReturn() |
private final Node n
private boolean hasNonEmptyReturns
private java.util.Set<java.lang.String> escapedVarNames
private java.util.Set<java.lang.String> escapedQualifiedNames
private final com.google.common.collect.Multiset<java.lang.String> assignedVarNames
AstFunctionContents(Node n)
public Node getSourceNode()
FunctionTypeBuilder.FunctionContents
getSourceNode
in interface FunctionTypeBuilder.FunctionContents
public boolean mayBeFromExterns()
FunctionTypeBuilder.FunctionContents
mayBeFromExterns
in interface FunctionTypeBuilder.FunctionContents
public boolean mayHaveNonEmptyReturns()
FunctionTypeBuilder.FunctionContents
mayHaveNonEmptyReturns
in interface FunctionTypeBuilder.FunctionContents
void recordNonEmptyReturn()
public boolean mayHaveSingleThrow()
FunctionTypeBuilder.FunctionContents
mayHaveSingleThrow
in interface FunctionTypeBuilder.FunctionContents
public java.lang.Iterable<java.lang.String> getEscapedVarNames()
FunctionTypeBuilder.FunctionContents
getEscapedVarNames
in interface FunctionTypeBuilder.FunctionContents
void recordEscapedVarName(java.lang.String name)
public java.util.Set<java.lang.String> getEscapedQualifiedNames()
FunctionTypeBuilder.FunctionContents
getEscapedQualifiedNames
in interface FunctionTypeBuilder.FunctionContents
void recordEscapedQualifiedName(java.lang.String name)
public com.google.common.collect.Multiset<java.lang.String> getAssignedNameCounts()
FunctionTypeBuilder.FunctionContents
getAssignedNameCounts
in interface FunctionTypeBuilder.FunctionContents
void recordAssignedName(java.lang.String name)