public class StatsHelper extends Object implements VariableDeclarations
| Constructor and Description |
|---|
StatsHelper()
Construct a
StatsHelper |
| Modifier and Type | Method and Description |
|---|---|
Node |
getVariable(String name)
Tries to fetch a Stats field
|
boolean |
hasVariable(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(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(String name)
name - The name of the variable of the Stats fieldpublic boolean hasVariable(String name)
hasVariable in interface VariableDeclarationsname - name of the variablepublic Node getVariable(String name)
VariableDeclaration applies here too.getVariable in interface VariableDeclarationsname - name of the variableCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.