org.directwebremoting.extend
Interface OutboundVariable

All Known Implementing Classes:
ArrayOutboundVariable, ErrorOutboundVariable, NestedOutboundVariable, NonNestedOutboundVariable, ObjectOutboundVariable

public interface OutboundVariable

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:

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.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Method Summary
 java.lang.String getAssignCode()
          A short script that can be used to refer to this variable
 java.lang.String getBuildCode()
          A script that completes the definition of this variable, and may contain reference to other declared variables.
 java.lang.String getDeclareCode()
          A script to declare the variable so it can be referred to.
 OutboundVariable getReferenceVariable()
          Get a reference to this OutboundVariable.
 

Method Detail

getReferenceVariable

OutboundVariable getReferenceVariable()
Get a reference to this OutboundVariable. During step 1 of the conversion process where we turn the raw objects into OutboundVariables we may wish to refer to something that has already been converted. If this already is a reference then this method returns this, or if not it creates one that does.

Returns:
An OutboundVariable that refers to this one.

getDeclareCode

java.lang.String getDeclareCode()
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:
Returns the declareCode

getBuildCode

java.lang.String getBuildCode()
A script that completes the definition of this variable, and may contain reference to other declared variables.

Returns:
Returns the buildCode.

getAssignCode

java.lang.String getAssignCode()
A short script that can be used to refer to this variable

Returns:
Returns the assignCode.

Copyright 2008