public class BlockScopeEnv extends ProxyEnv
Env for a new block.MAX_LEGAL_DEPTH| Constructor and Description |
|---|
BlockScopeEnv(Env parent) |
BlockScopeEnv(Env parent,
int localsSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
declareVariable(Class type,
String name)
Defines a local variable in the current environment.
|
Object |
getLocalVariable(String name)
Obtains the current value of a local variable in the current environment.
|
Class |
getLocalVariableType(String name) |
void |
setLocalVariable(String name,
Object value)
Sets the local variable to a new value.
|
buildStackTraceElements, closureOwner, getBreakAddress, getContinueAddress, getDepth, getExceptionHandler, getInvoker, getReturnAddresspublic BlockScopeEnv(Env parent)
public BlockScopeEnv(Env parent, int localsSize)
public void declareVariable(Class type, String name)
EnvdeclareVariable in interface EnvdeclareVariable in class ProxyEnvtype - Type of the local variable. Object when unknown/implicit (e.g. "def x")name - Name of the local variable.VariableDeclBlockpublic Object getLocalVariable(String name)
EnvgetLocalVariable in interface EnvgetLocalVariable in class ProxyEnvname - Name of the local variable.LocalVariableBlockpublic Class getLocalVariableType(String name)
getLocalVariableType in interface EnvgetLocalVariableType in class ProxyEnvpublic void setLocalVariable(String name, Object value)
EnvsetLocalVariable in interface EnvsetLocalVariable in class ProxyEnvname - Name of the local variable.value - New valueLocalVariableBlockCopyright © 2011–2019. All rights reserved.