MCPcopy Index your code
hub / github.com/beanshell/beanshell / eval

Method eval

src/bsh/BSHMethodDeclaration.java:110–133  ·  view source on GitHub ↗

Evaluate the declaration of the method. That is, determine the structure of the method and install it into the caller's namespace.

( CallStack callstack, Interpreter interpreter )

Source from the content-addressed store, hash-verified

108 structure of the method and install it into the caller's namespace.
109 */
110 public Object eval( CallStack callstack, Interpreter interpreter )
111 throws EvalError
112 {
113 returnType = evalReturnType( callstack, interpreter );
114 evalNodes( callstack, interpreter );
115
116 // Install an *instance* of this method in the namespace.
117 // See notes in BshMethod
118
119// This is not good...
120// need a way to update eval without re-installing...
121// so that we can re-eval params, etc. when classloader changes
122// look into this
123
124 NameSpace namespace = callstack.top();
125 BshMethod bshMethod = new BshMethod( this, namespace, modifiers );
126 try {
127 namespace.setMethod( bshMethod );
128 } catch ( UtilEvalError e ) {
129 throw e.toEvalError(this,callstack);
130 }
131
132 return Primitive.VOID;
133 }
134
135 private void evalNodes( CallStack callstack, Interpreter interpreter )
136 throws EvalError

Callers

nothing calls this directly

Calls 5

evalReturnTypeMethod · 0.95
evalNodesMethod · 0.95
setMethodMethod · 0.95
topMethod · 0.80
toEvalErrorMethod · 0.45

Tested by

no test coverage detected