ice.storm
Class DynamicList

java.lang.Object
  extended byice.storm.DynamicObject
      extended byice.storm.DynamicList
Direct Known Subclasses:
DAllList, DAttrMap, DChildrenList, DFlatList, DMediaList, DNodeList, DRuleList, DStyleDeclaration

public abstract class DynamicList
extends DynamicObject

Common base for all collection like objects


Field Summary
 
Fields inherited from class ice.storm.DynamicObject
NOT_FOUND, SETD_IGNORE, SETD_NOT_FOUND, SETD_OK
 
Constructor Summary
DynamicList()
           
 
Method Summary
 Object execDynamicMethod(String name, Object[] args, DynEnv env)
          Perform function-like actions for `name' with the given args.
 Object getDynamicValue(String name, DynEnv env)
          Returns the `key' field or Defs.NOT_FOUND if `name' does not exist.
 Object[] getEnumeratableIds(DynEnv env, int add_head_allocation)
           
protected abstract  int getLength()
           
 DynamicObject getMethodPropertySource(String methodName, DynEnv env)
          ALERT: this is some-what weired method but it helps to merge same named properties and methods
 Object getSlot(int index, DynEnv env)
           
 Object getSlot(String name, DynEnv env)
           
protected abstract  Object script_item(int index, DynEnv env)
          Returns null if not found
protected abstract  Object script_namedItem(String name, DynEnv env)
          Returns null if not found
protected  Object script_tags(String tag_name, DynEnv env)
           
 int setDynamicValue(String name, Object value, DynEnv env)
          Set field `name' to `value'.
 
Methods inherited from class ice.storm.DynamicObject
deleteSlot, deleteSlot, getDynamicScopeParent, getScriptDataLock, getScriptWrapper, hasSlot, hasSlot, javaReflectionTarget, readOnlySlots, script_toSource, script_toString, setScriptWrapperIfAbsent, setSlot, setSlot, unlinkAllSlots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicList

public DynamicList()
Method Detail

getLength

protected abstract int getLength()

script_item

protected abstract Object script_item(int index,
                                      DynEnv env)
Returns null if not found


script_namedItem

protected abstract Object script_namedItem(String name,
                                           DynEnv env)
Returns null if not found


script_tags

protected Object script_tags(String tag_name,
                             DynEnv env)

getSlot

public Object getSlot(String name,
                      DynEnv env)
Overrides:
getSlot in class DynamicObject

getSlot

public Object getSlot(int index,
                      DynEnv env)
Overrides:
getSlot in class DynamicObject

getEnumeratableIds

public Object[] getEnumeratableIds(DynEnv env,
                                   int add_head_allocation)
Overrides:
getEnumeratableIds in class DynamicObject

getMethodPropertySource

public DynamicObject getMethodPropertySource(String methodName,
                                             DynEnv env)
Description copied from class: DynamicObject
ALERT: this is some-what weired method but it helps to merge same named properties and methods

Overrides:
getMethodPropertySource in class DynamicObject

getDynamicValue

public Object getDynamicValue(String name,
                              DynEnv env)
Description copied from class: DynamicObject
Returns the `key' field or Defs.NOT_FOUND if `name' does not exist. Returns `FUNCTION_MARK' if `name' represent a function that can be invoke via execDynamicMethod. Note that returned `null' indicates that value is present but set to null.

Overrides:
getDynamicValue in class DynamicObject

setDynamicValue

public int setDynamicValue(String name,
                           Object value,
                           DynEnv env)
Description copied from class: DynamicObject
Set field `name' to `value'. Use `env' to unwrap `value' to a particular type or store it as is

Overrides:
setDynamicValue in class DynamicObject
Returns:
SETD_NOT_FOUND if fied `name' is absent, SETD_IGNORE if field exist but set is ignored SETD_OK if set opeartion was ok

execDynamicMethod

public Object execDynamicMethod(String name,
                                Object[] args,
                                DynEnv env)
Description copied from class: DynamicObject
Perform function-like actions for `name' with the given args. Returns the result or Defs.NOT_FOUND if name is not associated with function action. Should return result of env.wrapVoid() to indicate method without return value. Use `env' to unwrap `args' elements to a particular type.

Overrides:
execDynamicMethod in class DynamicObject
See Also:
DynEnv