public CallStack( NameSpace namespace ) { push( namespace ); }
public CallStack( NameSpace namespace ) { push( namespace ); }
private Object doNewInner(Object obj, boolean toLHS, CallStack callstack, Interpreter interpreter) throws EvalError { callstack.pop(); callstack.push(Reflect.getThisNS(obj)); return ((BSHAllocationExpression)jjtGetChild(0)).eval(callstack, interpreter); }
public Object constructWithInterfaceBody( BSHAllocationExpression node, Class type, Object[] args, BSHBlock body ) throws EvalError { NameSpace namespace = callstack.top(); NameSpace local = new NameSpace(namespace, "AnonymousBlock"); callstack.push(local); evalBlock(body, true); callstack.pop(); // statical import fields from the interface so that code inside // can refer to the fields directly (e.g. HEIGHT) local.importStatic( type ); return local.getThis(interpreter).getInterface( type ); }
private Object constructWithInterfaceBody( Class type, Object[] args, BSHBlock body, CallStack callstack, Interpreter interpreter ) throws EvalError { NameSpace namespace = callstack.top(); NameSpace local = new NameSpace(namespace, "AnonymousBlock"); callstack.push(local); body.eval( callstack, interpreter, true/*overrideNamespace*/ ); callstack.pop(); // statical import fields from the interface so that code inside // can refer to the fields directly (e.g. HEIGHT) local.importStatic( type ); return local.getThis(interpreter).getInterface( type ); }
classStaticNameSpace.isClass = true; visitor.getCallstack().push(classStaticNameSpace);
callstack.push(consArgsNameSpace); Object[] args = constructor.getConstructorArgs(); Interpreter interpreter = classStaticThis.declaringInterpreter;
callstack.push(instanceNameSpace);
callstack.push( globalNameSpace );
callstack.push( nameSpace );
callstack.push(consArgsNameSpace); Object[] args; Interpreter interpreter = classStaticThis.declaringInterpreter;
callstack.push( globalNameSpace );
callstack.push( localNameSpace );
classStaticNameSpace.isClass = true; callstack.push(classStaticNameSpace);
callstack.push( nameSpace );
visitor.getCallstack().push( localNameSpace );