org.nlogo.nvm
Class Instruction
java.lang.Object
org.nlogo.nvm.Instruction
- All Implemented Interfaces:
- org.nlogo.api.TokenHolder
- Direct Known Subclasses:
- Command, Reporter
public abstract class Instruction
- extends Object
- implements org.nlogo.api.TokenHolder
Method Summary |
Agent |
argEvalAgent(Context context,
int argIndex)
|
AgentSet |
argEvalAgentSet(Context context,
int argIndex)
|
AgentSet |
argEvalAgentSet(Context context,
int argIndex,
Class<? extends Agent> type)
|
Boolean |
argEvalBoolean(Context context,
int argIndex)
|
boolean |
argEvalBooleanValue(Context context,
int argIndex)
|
Double |
argEvalDouble(Context context,
int argIndex)
|
double |
argEvalDoubleValue(Context context,
int argIndex)
|
int |
argEvalIntValue(Context context,
int argIndex)
|
Link |
argEvalLink(Context context,
int argIndex)
|
LogoList |
argEvalList(Context context,
int argIndex)
|
Patch |
argEvalPatch(Context context,
int argIndex)
|
String |
argEvalString(Context context,
int argIndex)
|
Turtle |
argEvalTurtle(Context context,
int argIndex)
|
void |
copyFieldsFrom(Instruction sourceInstr)
|
String |
displayName()
|
String |
dump()
|
String |
dump(int indentLevel)
|
Instruction |
extractErrorInstruction(EngineException ex)
|
int[] |
getPositionAndLength()
|
int |
getSourceEndPosition()
|
String |
getSourceSnippet()
|
int |
getSourceStartPosition()
|
abstract Syntax |
getSyntax()
|
void |
init(Workspace workspace)
|
static boolean |
isValidLong(double d)
|
Double |
newValidDouble(double d)
|
void |
setSourceSnippet(String s)
|
void |
throwAgentClassException(Context context,
Class<? extends Agent> agentClass)
|
org.nlogo.api.Token |
token()
|
void |
token(org.nlogo.api.Token token)
|
org.nlogo.api.Token |
tokenLimitingType()
|
void |
tokenLimitingType(org.nlogo.api.Token token)
|
String |
toString()
|
double |
validDouble(double d)
|
long |
validLong(double d)
|
world
public World world
args
public Reporter[] args
chosenMethod
public Method chosenMethod
source
public String source
disassembly
public org.nlogo.util.Thunk<String> disassembly
agentClassString
public String agentClassString
agentBits
public int agentBits
storedSourceStartPosition
public int storedSourceStartPosition
storedSourceEndPosition
public int storedSourceEndPosition
Instruction
public Instruction()
getSyntax
public abstract Syntax getSyntax()
token
public org.nlogo.api.Token token()
token
public void token(org.nlogo.api.Token token)
- Specified by:
token
in interface org.nlogo.api.TokenHolder
tokenLimitingType
public org.nlogo.api.Token tokenLimitingType()
tokenLimitingType
public void tokenLimitingType(org.nlogo.api.Token token)
init
public void init(Workspace workspace)
getPositionAndLength
public int[] getPositionAndLength()
getSourceStartPosition
public int getSourceStartPosition()
getSourceEndPosition
public int getSourceEndPosition()
setSourceSnippet
public void setSourceSnippet(String s)
getSourceSnippet
public String getSourceSnippet()
displayName
public String displayName()
toString
public String toString()
- Overrides:
toString
in class Object
dump
public String dump()
dump
public String dump(int indentLevel)
validLong
public long validLong(double d)
throws LogoException
- Throws:
LogoException
isValidLong
public static boolean isValidLong(double d)
newValidDouble
public Double newValidDouble(double d)
throws LogoException
- Throws:
LogoException
validDouble
public double validDouble(double d)
throws LogoException
- Throws:
LogoException
throwAgentClassException
public void throwAgentClassException(Context context,
Class<? extends Agent> agentClass)
throws EngineException
- Throws:
EngineException
argEvalAgent
public Agent argEvalAgent(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalAgentSet
public AgentSet argEvalAgentSet(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalAgentSet
public AgentSet argEvalAgentSet(Context context,
int argIndex,
Class<? extends Agent> type)
throws LogoException
- Throws:
LogoException
argEvalBoolean
public Boolean argEvalBoolean(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalBooleanValue
public boolean argEvalBooleanValue(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalDoubleValue
public double argEvalDoubleValue(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalIntValue
public int argEvalIntValue(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalList
public LogoList argEvalList(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalPatch
public Patch argEvalPatch(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalString
public String argEvalString(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalDouble
public Double argEvalDouble(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalTurtle
public Turtle argEvalTurtle(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
argEvalLink
public Link argEvalLink(Context context,
int argIndex)
throws LogoException
- Throws:
LogoException
copyFieldsFrom
public void copyFieldsFrom(Instruction sourceInstr)
extractErrorInstruction
public Instruction extractErrorInstruction(EngineException ex)