Class Self
- java.lang.Object
-
- org.protelis.lang.interpreter.impl.AbstractProtelisAST<ExecutionContext>
-
- org.protelis.lang.interpreter.impl.Self
-
- All Implemented Interfaces:
java.io.Serializable
,ProtelisAST<ExecutionContext>
,WithBytecode
public final class Self extends AbstractProtelisAST<ExecutionContext>
Access to the evaluation context, which is used for interfacing with sensors, actuators, and the rest of the external non-static programmatic environment outside of Protelis.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionContext
evaluate(ExecutionContext context)
Evaluates this AST node.Bytecode
getBytecode()
java.lang.String
toString()
-
Methods inherited from class org.protelis.lang.interpreter.impl.AbstractProtelisAST
branchesToString, branchesToString, eval, forEach, forEachWithIndex, getBranch, getBranches, getBranchesNumber, getMetadata, getName, isNullable, stringFor
-
-
-
-
Method Detail
-
evaluate
public ExecutionContext evaluate(ExecutionContext context)
Description copied from class:AbstractProtelisAST
Evaluates this AST node. This method can throw any exception,AbstractProtelisAST
takes care of storing the necessary metadata.- Specified by:
evaluate
in classAbstractProtelisAST<ExecutionContext>
- Parameters:
context
- the execution context- Returns:
- the result of the evaluation
-
toString
public java.lang.String toString()
Description copied from class:AbstractProtelisAST
- Overrides:
toString
in classAbstractProtelisAST<ExecutionContext>
-
-