public class ProcedureManager extends Object
| Constructor and Description |
|---|
ProcedureManager()
Create an procedure manager that can manage procedures within a scope.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(InstructionLine line)
Indicates if the current scope contains a procedure that matches the call
of the specied line.
|
void |
execute(InstructionLine line,
DataSource source,
InterpreterContext context) |
void |
execute(String name,
Object[] parameters,
InterpreterContext context) |
Map<String,Procedure> |
peekScope() |
Map<String,Procedure> |
popScope()
Pops a scope from the stack.
|
void |
pushScope()
Creates a new scope an pushed this to the stack.
|
void |
pushScope(Map<String,Procedure> scope)
Pushes a scope to the stack.
|
Procedure |
register(String name,
Procedure procedure)
Registers a procedure under the specified calling name.
|
void |
unregister(String name) |
public ProcedureManager()
public void pushScope()
public void pushScope(Map<String,Procedure> scope)
scope - the map with procedures to be pushed.public boolean contains(InstructionLine line)
line - to be tested agains the current scope.public final Procedure register(String name, Procedure procedure)
name - the name under which the procedure can be called.procedure - the procedure to register.public void unregister(String name)
public void execute(InstructionLine line, DataSource source, InterpreterContext context)
public void execute(String name, Object[] parameters, InterpreterContext context)
Copyright © 2015. All rights reserved.