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.FunctionContentsgetSourceNode in interface FunctionTypeBuilder.FunctionContentspublic boolean mayBeFromExterns()
FunctionTypeBuilder.FunctionContentsmayBeFromExterns in interface FunctionTypeBuilder.FunctionContentspublic boolean mayHaveNonEmptyReturns()
FunctionTypeBuilder.FunctionContentsmayHaveNonEmptyReturns in interface FunctionTypeBuilder.FunctionContentsvoid recordNonEmptyReturn()
public boolean mayHaveSingleThrow()
FunctionTypeBuilder.FunctionContentsmayHaveSingleThrow in interface FunctionTypeBuilder.FunctionContentspublic java.lang.Iterable<java.lang.String> getEscapedVarNames()
FunctionTypeBuilder.FunctionContentsgetEscapedVarNames in interface FunctionTypeBuilder.FunctionContentsvoid recordEscapedVarName(java.lang.String name)
public java.util.Set<java.lang.String> getEscapedQualifiedNames()
FunctionTypeBuilder.FunctionContentsgetEscapedQualifiedNames in interface FunctionTypeBuilder.FunctionContentsvoid recordEscapedQualifiedName(java.lang.String name)
public com.google.common.collect.Multiset<java.lang.String> getAssignedNameCounts()
FunctionTypeBuilder.FunctionContentsgetAssignedNameCounts in interface FunctionTypeBuilder.FunctionContentsvoid recordAssignedName(java.lang.String name)