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

Method evalNodes

src/bsh/BSHMethodDeclaration.java:135–166  ·  view source on GitHub ↗
( CallStack callstack, Interpreter interpreter )

Source from the content-addressed store, hash-verified

133 }
134
135 private void evalNodes( CallStack callstack, Interpreter interpreter )
136 throws EvalError
137 {
138 insureNodesParsed();
139
140 // validate that the throws names are class names
141 for(int i=firstThrowsClause; i<numThrows+firstThrowsClause; i++)
142 ((BSHAmbiguousName)jjtGetChild(i)).toClass(
143 callstack, interpreter );
144
145 paramsNode.eval( callstack, interpreter );
146
147 // if strictJava mode, check for loose parameters and return type
148 if ( interpreter.getStrictJava() )
149 {
150 for(int i=0; i<paramsNode.paramTypes.length; i++)
151 if ( paramsNode.paramTypes[i] == null )
152 // Warning: Null callstack here. Don't think we need
153 // a stack trace to indicate how we sourced the method.
154 throw new EvalError(
155 "(Strict Java Mode) Undeclared argument type, parameter: " +
156 paramsNode.getParamNames()[i] + " in method: "
157 + name, this, null );
158
159 if ( returnType == null )
160 // Warning: Null callstack here. Don't think we need
161 // a stack trace to indicate how we sourced the method.
162 throw new EvalError(
163 "(Strict Java Mode) Undeclared return type for method: "
164 + name, this, null );
165 }
166 }
167
168 public String toString() {
169 return "MethodDeclaration: "+name;

Callers 1

evalMethod · 0.95

Calls 6

insureNodesParsedMethod · 0.95
getStrictJavaMethod · 0.80
getParamNamesMethod · 0.80
jjtGetChildMethod · 0.65
evalMethod · 0.65
toClassMethod · 0.45

Tested by

no test coverage detected