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 ); }
public String getScriptStackTrace() { if ( callstack == null ) return "<Unknown>"; String trace = ""; CallStack stack = callstack.copy(); while ( stack.depth() > 0 ) { NameSpace ns = stack.pop(); SimpleNode node = ns.getNode(); if ( ns.isMethod ) { trace = trace + "\nCalled from method: " + ns.getName(); if ( node != null ) trace += " : at Line: "+ node.getLineNumber() + " : in file: "+ node.getSourceFile() + " : "+node.getText(); } } return trace; }
public String getScriptStackTrace() { if ( callstack == null ) return "<Unknown>"; String trace = ""; CallStack stack = callstack.copy(); while ( stack.depth() > 0 ) { NameSpace ns = stack.pop(); SimpleNode node = ns.getNode(); if ( ns.isMethod ) { trace = trace + "\nCalled from method: " + ns.getName(); if ( node != null ) trace += " : at Line: "+ node.getLineNumber() + " : in file: "+ node.getSourceFile() + " : "+node.getText(); } } return trace; }
String stackInfo = "Bsh Stack: "; while ( callstack.depth() > callstackDepth ) stackInfo += "\t" + callstack.pop() +"\n";
callstack.pop(); } finally {
visitor.getCallstack().pop();
callstack.pop();
callstack.pop();
DelayedEvalBshMethod[] methods = getDeclaredMethods(block, callstack, interpreter, packageName, superClass); callstack.pop();
visitor.getCallstack().pop();