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

Method getMethodReference

java/org/apache/el/parser/AstValue.java:238–254  ·  view source on GitHub ↗
(EvaluationContext ctx)

Source from the content-addressed store, hash-verified

236 }
237
238 @Override
239 public MethodReference getMethodReference(EvaluationContext ctx) {
240 Target t = getTarget(ctx);
241 Method m;
242 Object[] values = null;
243 Class<?>[] types = null;
244 if (isParametersProvided()) {
245 values = ((AstMethodParameters) this.jjtGetChild(this.jjtGetNumChildren() - 1)).getParameters(ctx);
246 types = getTypesFromValues(values);
247 }
248 m = ReflectionUtil.getMethod(ctx, t.base, t.property, types, values);
249
250 // Handle varArgs and any coercion required
251 values = convertArgs(ctx, values, m);
252
253 return new MethodReference(t.base, getMethodInfo(ctx, types), m.getAnnotations(), values);
254 }
255
256 private Object[] convertArgs(EvaluationContext ctx, Object[] src, Method m) {
257 Class<?>[] types = m.getParameterTypes();

Callers

nothing calls this directly

Calls 10

getTargetMethod · 0.95
isParametersProvidedMethod · 0.95
getTypesFromValuesMethod · 0.95
getMethodMethod · 0.95
convertArgsMethod · 0.95
getMethodInfoMethod · 0.95
getAnnotationsMethod · 0.80
getParametersMethod · 0.65
jjtGetChildMethod · 0.65
jjtGetNumChildrenMethod · 0.65

Tested by

no test coverage detected