com.sodius.mdw.core.eval.scripts
Class ScriptContainer

java.lang.Object
  extended by com.sodius.mdw.core.eval.scripts.ScriptContainer
Direct Known Subclasses:
MDWObjectScriptContainer

public abstract class ScriptContainer
extends Object

Base class for Java script containers.

This class provides access to the evaluation context through the field context. The evaluation context provides services that helps to build model transformators/generators.

This class also provides asList methods to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue));

This class is not intended to be subclasses by clients.


Field Summary
static EvaluationContext context
          Return the current evaluation context.
 
Constructor Summary
ScriptContainer()
           
 
Method Summary
static List<Object> asList(Object o1)
          Creates a new list with the specified argument.
static List<Object> asList(Object o1, Object o2)
          Creates a new list with the specified arguments.
static List<Object> asList(Object o1, Object o2, Object o3)
          Creates a new list with the specified arguments.
static List<Object> asList(Object o1, Object o2, Object o3, Object o4)
          Creates a new list with the specified arguments.
static List<Object> asList(Object o1, Object o2, Object o3, Object o4, Object o5)
          Creates a new list with the specified arguments.
static List<Object> asList(Object o1, Object o2, Object o3, Object o4, Object o5, Object o6)
          Creates a new list with the specified arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

public static EvaluationContext context
Return the current evaluation context. The evaluation context provides services that helps to build model transformators/generators.

Constructor Detail

ScriptContainer

public ScriptContainer()
Method Detail

asList

public static List<Object> asList(Object o1)
Creates a new list with the specified argument. This is a facility to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue));

Returns:
a modifiable list containing the specified argument.

asList

public static List<Object> asList(Object o1,
                                  Object o2)
Creates a new list with the specified arguments. This is a facility to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue, aBooleanValue));

Returns:
a modifiable list containing the specified arguments.

asList

public static List<Object> asList(Object o1,
                                  Object o2,
                                  Object o3)
Creates a new list with the specified arguments. This is a facility to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue, aBooleanValue));

Returns:
a modifiable list containing the specified arguments.

asList

public static List<Object> asList(Object o1,
                                  Object o2,
                                  Object o3,
                                  Object o4)
Creates a new list with the specified arguments. This is a facility to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue, aBooleanValue));

Returns:
a modifiable list containing the specified arguments.

asList

public static List<Object> asList(Object o1,
                                  Object o2,
                                  Object o3,
                                  Object o4,
                                  Object o5)
Creates a new list with the specified arguments. This is a facility to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue, aBooleanValue));

Returns:
a modifiable list containing the specified arguments.

asList

public static List<Object> asList(Object o1,
                                  Object o2,
                                  Object o3,
                                  Object o4,
                                  Object o5,
                                  Object o6)
Creates a new list with the specified arguments. This is a facility to call from Java code scripts which expects arguments :
self.toString("myScript", asList(aStringValue, aBooleanValue));

Returns:
a modifiable list containing the specified arguments.