| org.directwebremoting.extend.OutboundVariable
All known Subclasses: org.directwebremoting.dwrp.NonJsonNestedOutboundVariable, org.directwebremoting.dwrp.JsonNestedOutboundVariable, org.directwebremoting.extend.NonNestedOutboundVariable,
OutboundVariable | public interface OutboundVariable (Code) | | A simple data container for 2 strings that comprise information about how a
Java object has been converted into Javascript.
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] |
getAssignCode | String getAssignCode()(Code) | | A short script that can be used to refer to this variable
Returns the assignCode. |
getBuildCode | String getBuildCode()(Code) | | A script that completes the definition of this variable, and may contain
reference to other declared variables.
Returns the buildCode. |
getDeclareCode | String getDeclareCode()(Code) | | A script to declare the variable so it can be referred to. This script
is guaranteed not to refer to anything that can recurse
Returns the declareCode |
getReferenceVariable | OutboundVariable getReferenceVariable()(Code) | | Get a reference to this OutboundVariable.
If this already is a reference then this method returns
this , or if not it creates one that does.
An OutboundVariable that refers to this one. |
prepareAssignCode | void prepareAssignCode()(Code) | | Things work out if they are doubly referenced during the conversion
process, and can't be sure how to create output until that phase is done.
This method creates the assign code such that other variables can
refer to us when creating build and declare codes
|
|
|