org.directwebremoting.extend
Class ObjectOutboundVariable

java.lang.Object
  extended by org.directwebremoting.extend.NestedOutboundVariable
      extended by org.directwebremoting.extend.ObjectOutboundVariable
All Implemented Interfaces:
OutboundVariable

public class ObjectOutboundVariable
extends NestedOutboundVariable

An OutboundVariable that declares a JavaScript object

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

Constructor Summary
ObjectOutboundVariable(OutboundContext context)
          Constructor for when we don't have a Javascript type to populate
ObjectOutboundVariable(OutboundContext context, java.lang.Class<?> type, java.lang.String scriptClassName)
          Constructor for when we have a Javascript type to populate
 
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.
 void setChildren(java.util.Collection<OutboundVariable> children)
          We setup the children later than construction time so we can check for recursive references.
 void setChildren(java.util.Map<java.lang.String,OutboundVariable> childMap)
          We setup the children later than construction time so we can check for recursive references.
 java.lang.String toString()
           
 
Methods inherited from class org.directwebremoting.extend.NestedOutboundVariable
getChildren, getReferenceVariable, isJsonMode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectOutboundVariable

public ObjectOutboundVariable(OutboundContext context,
                              java.lang.Class<?> type,
                              java.lang.String scriptClassName)
Constructor for when we have a Javascript type to populate


ObjectOutboundVariable

public ObjectOutboundVariable(OutboundContext context)
Constructor for when we don't have a Javascript type to populate

Method Detail

setChildren

public void setChildren(java.util.Collection<OutboundVariable> children)
Description copied from class: NestedOutboundVariable
We setup the children later than construction time so we can check for recursive references.

Overrides:
setChildren in class NestedOutboundVariable

setChildren

public void setChildren(java.util.Map<java.lang.String,OutboundVariable> childMap)
We setup the children later than construction time so we can check for recursive references.


getDeclareCode

public java.lang.String getDeclareCode()
Description copied from interface: OutboundVariable
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

public java.lang.String getBuildCode()
Description copied from interface: OutboundVariable
A script that completes the definition of this variable, and may contain reference to other declared variables.

Returns:
Returns the buildCode.

getAssignCode

public java.lang.String getAssignCode()
Description copied from interface: OutboundVariable
A short script that can be used to refer to this variable

Returns:
Returns the assignCode.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2008