Class Element

  extended by de.projectory.koivima.core.Element
Direct Known Subclasses:
AbstractElementList, DataElement, Operator

public abstract class Element
extends java.lang.Object

Element of a code block. Each element can be executed, even data elements. For example a data element would put itself to the data stack.

Field Summary
protected  ExecutionContext context
          provides the execution environment for this element
Constructor Summary
Method Summary
abstract  void execute()
          Executes this element.
 ExecutionContext getExecutionContext()
 void setExecutionContext(ExecutionContext context)
          Sets the ExecutionContext of this element.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected ExecutionContext context
provides the execution environment for this element

Constructor Detail


public Element()
Method Detail


public void setExecutionContext(ExecutionContext context)
Sets the ExecutionContext of this element. Every element must have an execution context for execution. However the execution context is not provided on creation. Instead this method is called when this element is inserted into a CodeBlock.

context - ExecutionContext for this CodeBlock. If the context is null a new context is generated.


public ExecutionContext getExecutionContext()
ExecutionContext of the this element


public abstract void execute()
Executes this element. An operator usually removes some itmes from the data stack and operates on them. A variable just puts itself to the stack.