Skip to content

Package: Expression

Expression

nameinstructionbranchcomplexitylinemethod
Expression()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2020 Oracle and/or its affiliates and others.
3: * All rights reserved.
4: * Copyright 2004 The Apache Software Foundation
5: *
6: * Licensed under the Apache License, Version 2.0 (the "License");
7: * you may not use this file except in compliance with the License.
8: * You may obtain a copy of the License at
9: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: package jakarta.servlet.jsp.el;
20:
21: /**
22: * <p>
23: * The abstract class for a prepared expression.
24: * </p>
25: *
26: * <p>
27: * An instance of an Expression can be obtained via from an ExpressionEvaluator instance.
28: * </p>
29: *
30: * <p>
31: * An Expression may or not have done a syntactic parse of the expression. A client invoking the evaluate() method
32: * should be ready for the case where ELParseException exceptions are raised.
33: * </p>
34: *
35: * @deprecated As of JSP 2.1, replaced by {@link jakarta.el.ValueExpression}
36: * @since JSP 2.0
37: */
38: @Deprecated
39: public abstract class Expression {
40:
41: /**
42: * Evaluates an expression that was previously prepared. In some implementations preparing an expression involves
43: * full syntactic validation, but others may not do so. Evaluating the expression may raise an ELParseException as
44: * well as other ELExceptions due to run-time evaluation.
45: *
46: * @param vResolver A VariableResolver instance that can be used at runtime to resolve the name of implicit objects
47: * into Objects.
48: * @return The result of the expression evaluation.
49: *
50: * @exception ELException Thrown if the expression evaluation failed.
51: */
52: public abstract Object evaluate(VariableResolver vResolver) throws ELException;
53: }