|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.xmlc.codegen.VarNames
Generate tmp variable names for use in initialization. Keeps a table of tmp variable names used in initialize of nodes. Since nodes are recursive, but the initialization code is an inline block of code, we use this to recycle as many variables as possible, but not clobber ones that are currently in use.
Constructor Summary | |
VarNames(String varType,
String varPrefix)
Construct a new object. |
Method Summary | |
String |
getVarDefs()
Get code to define local variables. |
String |
getVarName(int level)
Get the variable name for the current level. |
void |
insertVarDefs(JavaCode body)
Insert variable definitions at the beginning of the body of a method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VarNames(String varType, String varPrefix)
varType
- Type for the generated variable names.varPrefix
- Prefix for the generated variable names.Method Detail |
public String getVarName(int level)
level
- current level
public String getVarDefs()
public void insertVarDefs(JavaCode body)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |