()
| 2226 | } |
| 2227 | |
| 2228 | public Object eval() { |
| 2229 | try |
| 2230 | { |
| 2231 | Object[] argvals = new Object[args.count()]; |
| 2232 | for(int i = 0; i < args.count(); i++) |
| 2233 | argvals[i] = ((Expr) args.nth(i)).eval(); |
| 2234 | if(method != null) |
| 2235 | { |
| 2236 | LinkedList ms = new LinkedList(); |
| 2237 | ms.add(method); |
| 2238 | return Reflector.invokeMatchingMethod(methodName, ms, null, argvals); |
| 2239 | } |
| 2240 | return Reflector.invokeStaticMethod(c, methodName, argvals); |
| 2241 | } |
| 2242 | catch(Throwable e) |
| 2243 | { |
| 2244 | if(!(e instanceof CompilerException)) |
| 2245 | throw new CompilerException(source, line, column, null, CompilerException.PHASE_EXECUTION, e); |
| 2246 | else |
| 2247 | throw (CompilerException) e; |
| 2248 | } |
| 2249 | } |
| 2250 | |
| 2251 | public boolean canEmitPrimitive(){ |
| 2252 | return method != null && Util.isPrimitive(method.getReturnType()); |
nothing calls this directly
no test coverage detected