org.nlogo.nvm
Class Procedure

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

public class Procedure
extends Object


Nested Class Summary
static class Procedure.Type
           
 
Field Summary
 List<String> args
           
 Command[] code
           
 int endPos
           
 String fileName
           
 List<Let> lets
           
 int localsCount
           
 String name
           
 org.nlogo.api.Token nameToken
           
 SourceOwner owner
           
 int pos
           
 int templateVars
           
 boolean topLevel
           
 Procedure.Type tyype
           
 String usableBy
           
 
Constructor Summary
Procedure(String fileName, Procedure.Type tyype)
           
 
Method Summary
 String dump()
           
 String getNameAndFile()
           
 int getNumSlots()
          returns the total number of slots this procedure requires in an Activation.
 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<String> args

tyype

public final Procedure.Type tyype

usableBy

public String usableBy

localsCount

public int localsCount

templateVars

public int templateVars

topLevel

public boolean topLevel

owner

public SourceOwner owner

nameToken

public org.nlogo.api.Token nameToken

lets

public final List<Let> lets

code

public Command[] code
Constructor Detail

Procedure

public Procedure(String fileName,
                 Procedure.Type tyype)
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 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)