javax.el.MethodInfo Java Examples

The following examples show how to use javax.el.MethodInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AstValue.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Override
// Interface el.parser.Node uses raw types (and is auto-generated)
public MethodInfo getMethodInfo(EvaluationContext ctx,
        @SuppressWarnings("rawtypes") Class[] paramTypes)
        throws ELException {
    Target t = getTarget(ctx);
    Method m = ReflectionUtil.getMethod(
            ctx, t.base, t.property, paramTypes, null);
    return new MethodInfo(m.getName(), m.getReturnType(), m
            .getParameterTypes());
}
 
Example #2
Source File: AstValue.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Override
// Interface el.parser.Node uses raw types (and is auto-generated)
public MethodInfo getMethodInfo(EvaluationContext ctx, 
        @SuppressWarnings("rawtypes") Class[] paramTypes)
        throws ELException {
    Target t = getTarget(ctx);
    Method m = ReflectionUtil.getMethod(
            t.base, t.property, paramTypes, null);
    return new MethodInfo(m.getName(), m.getReturnType(), m
            .getParameterTypes());
}
 
Example #3
Source File: MethodExpressionLiteral.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Override
public MethodInfo getMethodInfo(ELContext context) throws ELException {
    context.notifyBeforeEvaluation(getExpressionString());
    MethodInfo result =
            new MethodInfo(this.expr, this.expectedType, this.paramTypes);
    context.notifyAfterEvaluation(getExpressionString());
    return result;
}
 
Example #4
Source File: AstValue.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Override
// Interface el.parser.Node uses raw types (and is auto-generated)
public MethodInfo getMethodInfo(EvaluationContext ctx, 
        @SuppressWarnings("rawtypes") Class[] paramTypes)
        throws ELException {
    Target t = getTarget(ctx);
    Method m = ReflectionUtil.getMethod(
            t.base, t.property, paramTypes, null);
    return new MethodInfo(m.getName(), m.getReturnType(), m
            .getParameterTypes());
}
 
Example #5
Source File: AstIdentifier.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
        Class<?>[] paramTypes) throws ELException {
    return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext());
}
 
Example #6
Source File: MethodExpressionLiteral.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(ELContext context) throws ELException {
    return new MethodInfo(this.expr, this.expectedType, this.paramTypes);
}
 
Example #7
Source File: AstIdentifier.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
        Class<?>[] paramTypes) throws ELException {
    return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext());
}
 
Example #8
Source File: Node.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
public MethodInfo getMethodInfo(EvaluationContext ctx, Class<?>[] paramTypes)
throws ELException;
 
Example #9
Source File: SimpleNode.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
        Class<?>[] paramTypes) throws ELException {
    throw new UnsupportedOperationException();
}
 
Example #10
Source File: MethodExpressionLiteral.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(ELContext context) throws ELException {
    return new MethodInfo(this.expr, this.expectedType, this.paramTypes);
}
 
Example #11
Source File: SimpleNode.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
        Class<?>[] paramTypes) throws ELException {
    throw new UnsupportedOperationException();
}
 
Example #12
Source File: Node.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
public MethodInfo getMethodInfo(EvaluationContext ctx, Class<?>[] paramTypes)
throws ELException;
 
Example #13
Source File: SimpleNode.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
        Class<?>[] paramTypes) throws ELException {
    throw new UnsupportedOperationException();
}
 
Example #14
Source File: AstIdentifier.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
@Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
        Class<?>[] paramTypes) throws ELException {
    return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext());
}
 
Example #15
Source File: Node.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
public MethodInfo getMethodInfo(EvaluationContext ctx, Class<?>[] paramTypes)
throws ELException;
 
Example #16
Source File: MethodExpressionImpl.java    From Tomcat7.0.67 with Apache License 2.0 3 votes vote down vote up
/**
 * Evaluates the expression relative to the provided context, and returns
 * information about the actual referenced method.
 * 
 * @param context
 *            The context of this evaluation
 * @return an instance of <code>MethodInfo</code> containing information
 *         about the method the expression evaluated to.
 * @throws NullPointerException
 *             if context is <code>null</code> or the base object is
 *             <code>null</code> on the last resolution.
 * @throws PropertyNotFoundException
 *             if one of the property resolutions failed because a specified
 *             variable or property does not exist or is not readable.
 * @throws MethodNotFoundException
 *             if no suitable method can be found.
 * @throws ELException
 *             if an exception was thrown while performing property or
 *             variable resolution. The thrown exception must be included as
 *             the cause property of this exception, if available.
 * @see javax.el.MethodExpression#getMethodInfo(javax.el.ELContext)
 */
@Override
public MethodInfo getMethodInfo(ELContext context)
        throws PropertyNotFoundException, MethodNotFoundException,
        ELException {
    Node n = this.getNode();
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    return n.getMethodInfo(ctx, this.paramTypes);
}
 
Example #17
Source File: MethodExpressionImpl.java    From Tomcat8-Source-Read with MIT License 3 votes vote down vote up
/**
 * Evaluates the expression relative to the provided context, and returns
 * information about the actual referenced method.
 *
 * @param context
 *            The context of this evaluation
 * @return an instance of <code>MethodInfo</code> containing information
 *         about the method the expression evaluated to.
 * @throws NullPointerException
 *             if context is <code>null</code> or the base object is
 *             <code>null</code> on the last resolution.
 * @throws PropertyNotFoundException
 *             if one of the property resolutions failed because a specified
 *             variable or property does not exist or is not readable.
 * @throws MethodNotFoundException
 *             if no suitable method can be found.
 * @throws ELException
 *             if an exception was thrown while performing property or
 *             variable resolution. The thrown exception must be included as
 *             the cause property of this exception, if available.
 * @see javax.el.MethodExpression#getMethodInfo(javax.el.ELContext)
 */
@Override
public MethodInfo getMethodInfo(ELContext context)
        throws PropertyNotFoundException, MethodNotFoundException,
        ELException {
    Node n = this.getNode();
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    ctx.notifyBeforeEvaluation(getExpressionString());
    MethodInfo result = n.getMethodInfo(ctx, this.paramTypes);
    ctx.notifyAfterEvaluation(getExpressionString());
    return result;
}
 
Example #18
Source File: MethodExpressionImpl.java    From tomcatsrc with Apache License 2.0 3 votes vote down vote up
/**
 * Evaluates the expression relative to the provided context, and returns
 * information about the actual referenced method.
 * 
 * @param context
 *            The context of this evaluation
 * @return an instance of <code>MethodInfo</code> containing information
 *         about the method the expression evaluated to.
 * @throws NullPointerException
 *             if context is <code>null</code> or the base object is
 *             <code>null</code> on the last resolution.
 * @throws PropertyNotFoundException
 *             if one of the property resolutions failed because a specified
 *             variable or property does not exist or is not readable.
 * @throws MethodNotFoundException
 *             if no suitable method can be found.
 * @throws ELException
 *             if an exception was thrown while performing property or
 *             variable resolution. The thrown exception must be included as
 *             the cause property of this exception, if available.
 * @see javax.el.MethodExpression#getMethodInfo(javax.el.ELContext)
 */
@Override
public MethodInfo getMethodInfo(ELContext context)
        throws PropertyNotFoundException, MethodNotFoundException,
        ELException {
    Node n = this.getNode();
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    return n.getMethodInfo(ctx, this.paramTypes);
}