|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.projectory.koivima.core.Element
de.projectory.koivima.core.AbstractElementList
de.projectory.koivima.core.CodeBlock
public class CodeBlock
An executable piece of a program consisting of elements.
| Field Summary | |
|---|---|
(package private) int |
codePointer
pointer to the current element to execute |
(package private) boolean |
codePointerIsClean
set to false if the code pointer has been changed from the outside |
(package private) ExecutionContext |
localContext
Execution context for the elements of this CodeBlock |
| Fields inherited from class de.projectory.koivima.core.AbstractElementList |
|---|
code |
| Fields inherited from class de.projectory.koivima.core.Element |
|---|
context |
| Constructor Summary | |
|---|---|
CodeBlock()
|
|
| Method Summary | |
|---|---|
void |
add(Element element)
Adds an element to the end of this code block. |
void |
addFirst(Element element)
Adds an element to the beginning of this list. |
void |
evaluate()
Evaluates this whole code block |
void |
moveCodePointer(int offset)
Moves the code pointer. |
void |
onError(java.lang.String message)
Called if an error ocurs. |
Element |
removeFirst()
Removes the first element of executable code. |
void |
setExecutionContext(ExecutionContext context)
Overwrites setExecutionContext of AbstractElementList |
java.lang.String |
toString()
Returns a String representation of this code block. |
| Methods inherited from class de.projectory.koivima.core.AbstractElementList |
|---|
execute, iterator |
| Methods inherited from class de.projectory.koivima.core.Element |
|---|
getExecutionContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int codePointer
boolean codePointerIsClean
ExecutionContext localContext
| Constructor Detail |
|---|
public CodeBlock()
| Method Detail |
|---|
public void setExecutionContext(ExecutionContext context)
setExecutionContext in class AbstractElementListcontext - ExecutionContext for this CodeBlock.public void add(Element element)
add in class AbstractElementListelement - A code element: data element, operator or otherpublic void addFirst(Element element)
addFirst in class AbstractElementListelement - A code element: data element, operator or otherpublic Element removeFirst()
public void evaluate()
public void moveCodePointer(int offset)
offset - Steps to move the code pointer.public void onError(java.lang.String message)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||