( CallStack callstack, Interpreter interpreter )
| 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; |
no test coverage detected