org.directwebremoting.extend
Interface OutboundVariable

All Known Subinterfaces:
CollectionOutboundVariable, MapOutboundVariable
All Known Implementing Classes:
ArrayJsonOutboundVariable, ArrayNonJsonOutboundVariable, ErrorOutboundVariable, JsonNestedOutboundVariable, NonJsonNestedOutboundVariable, NonNestedOutboundVariable, ObjectJsonOutboundVariable, ObjectNonJsonOutboundVariable

public interface OutboundVariable

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.

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.
 void prepareAssignCode()
          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.
 void prepareBuildDeclareCodes()
          Create build and declare codes.
 

Method Detail

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.

getReferenceVariable

OutboundVariable getReferenceVariable()
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.

Returns:
An OutboundVariable that refers to this one.

prepareAssignCode

void prepareAssignCode()
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


prepareBuildDeclareCodes

void prepareBuildDeclareCodes()
Create build and declare codes.

See Also:
prepareAssignCode()

Copyright ¬ 2005