MCPcopy Index your code
hub / github.com/apache/tomcat / invoke

Method invoke

java/org/apache/el/parser/AstValue.java:202–236  ·  view source on GitHub ↗
(EvaluationContext ctx, @SuppressWarnings("rawtypes") Class[] paramTypes, Object[] paramValues)

Source from the content-addressed store, hash-verified

200 }
201
202 @Override
203 // Interface el.parser.Node uses a raw type (and is auto-generated)
204 public Object invoke(EvaluationContext ctx, @SuppressWarnings("rawtypes") Class[] paramTypes, Object[] paramValues)
205 throws ELException {
206
207 Target t = getTarget(ctx);
208 Method m;
209 Object[] values;
210 Class<?>[] types;
211 if (isParametersProvided()) {
212 values = ((AstMethodParameters) this.jjtGetChild(this.jjtGetNumChildren() - 1)).getParameters(ctx);
213 types = getTypesFromValues(values);
214 } else {
215 values = paramValues;
216 types = paramTypes;
217 }
218 m = ReflectionUtil.getMethod(ctx, t.base, t.property, types, values);
219
220 // Handle varArgs and any coercion required
221 values = convertArgs(ctx, values, m);
222
223 Object result;
224 try {
225 result = m.invoke(t.base, values);
226 } catch (IllegalAccessException | IllegalArgumentException e) {
227 throw new ELException(e);
228 } catch (InvocationTargetException ite) {
229 Throwable cause = ite.getCause();
230 if (cause instanceof VirtualMachineError) {
231 throw (VirtualMachineError) cause;
232 }
233 throw new ELException(cause);
234 }
235 return result;
236 }
237
238 @Override
239 public MethodReference getMethodReference(EvaluationContext ctx) {

Callers

nothing calls this directly

Calls 10

getTargetMethod · 0.95
isParametersProvidedMethod · 0.95
getTypesFromValuesMethod · 0.95
getMethodMethod · 0.95
convertArgsMethod · 0.95
getParametersMethod · 0.65
jjtGetChildMethod · 0.65
jjtGetNumChildrenMethod · 0.65
invokeMethod · 0.65
getCauseMethod · 0.45

Tested by

no test coverage detected