A simple data container for the strings that comprise information about how a Java object has been converted into Javascript.
There are 3 steps to conversion:
- First the {@link ConverterManager} creates a set of OutboundVariablesfrom the raw data.
- Second we reference count to see what needs to be outlined (i.e. not done inline). This typically means that something is declared before it is built.
- Finally we create the full output script.
There are potentially 3 parts to a variable in Javascript. If the variable is not something that can recurse then only the assignCode will contain data. Otherwise all the parts will be filled out.
- declareCode: To prevent problems with recursion, we declare everything first. A declaration will look something like
var s0 = [];
or var s1 = {};
. - buildCode: Next we fill in the contents of the objects and arrays.
- assignCode: This is an accessor for the name of the variable so we can refer to anything that has been declared.
@author Joe Walker [joe at getahead dot ltd dot uk]