org.nlogo.command
Class Procedure

java.lang.Object
  extended by org.nlogo.command.Procedure

public class Procedure
extends Object


Field Summary
 List args
           
 Command[] code
           
 int endPos
           
 String fileName
           
 List lets
           
 int localsCount
           
 String name
           
 org.nlogo.compiler.Token nameToken
           
 SourceOwner owner
           
 int pos
           
 int templateVars
           
 boolean topLevel
           
 int type
           
static int TYPE_COMMAND
           
static int TYPE_REPORTER
           
 String usableBy
           
 
Constructor Summary
Procedure(String fileName, int type)
           
 
Method Summary
 String dump()
           
 Let getLetFromArg(String ident, int tokPos)
           
 String getNameAndFile()
           
 int getNumSlots()
          returns the total number of slots this procedure requires in an Activation.
 org.nlogo.compiler.Syntax getSyntax()
           
 void init(Workspace workspace)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileName

public final String fileName

name

public String name

pos

public int pos

endPos

public int endPos

args

public List args

type

public final int type

usableBy

public String usableBy

localsCount

public int localsCount

templateVars

public int templateVars

topLevel

public boolean topLevel

owner

public SourceOwner owner

nameToken

public org.nlogo.compiler.Token nameToken

TYPE_COMMAND

public static final int TYPE_COMMAND
See Also:
Constant Field Values

TYPE_REPORTER

public static final int TYPE_REPORTER
See Also:
Constant Field Values

lets

public final List lets

code

public Command[] code
Constructor Detail

Procedure

public Procedure(String fileName,
                 int type)
Method Detail

getNumSlots

public int getNumSlots()
returns the total number of slots this procedure requires in an Activation. It's basically the arity of the procedure plus the number of local vars plus the number of unique (i.e., nested) template vars.


getSyntax

public org.nlogo.compiler.Syntax getSyntax()

getNameAndFile

public String getNameAndFile()

toString

public String toString()
Overrides:
toString in class Object

dump

public String dump()

init

public void init(Workspace workspace)

getLetFromArg

public Let getLetFromArg(String ident,
                         int tokPos)