public class StatsHelper extends java.lang.Object implements VariableDeclarations
| Constructor and Description |
|---|
StatsHelper()
Construct a
StatsHelper |
| Modifier and Type | Method and Description |
|---|---|
Node |
getVariable(java.lang.String name)
Tries to fetch a Stats field
|
boolean |
hasVariable(java.lang.String name)
Returns whether the variable is declared
|
void |
setStats(Stats stats)
Sets the corresponding Stats object
|
boolean |
used()
Whether Stats fields are accessed in the program
|
boolean |
used(java.lang.String name)
Returns whether the Stats field is used in the program
|
public StatsHelper()
StatsHelperpublic void setStats(Stats stats)
stats - the Stats object whose fields should be exposedpublic boolean used()
public boolean used(java.lang.String name)
name - The name of the variable of the Stats fieldpublic boolean hasVariable(java.lang.String name)
hasVariable in interface VariableDeclarationsname - name of the variablepublic Node getVariable(java.lang.String name)
VariableDeclaration applies here too.getVariable in interface VariableDeclarationsname - name of the variable