Skip to content

Package: VariableMapper

VariableMapper

nameinstructionbranchcomplexitylinemethod
VariableMapper()
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, 2019 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.el;
20:
21: /**
22: * The interface to a map between Jakarta Expression Language variables and the Jakarta Expression Language expressions
23: * they are associated with.
24: *
25: * @since Jakarta Server Pages 2.1
26: */
27: public abstract class VariableMapper {
28:
29: /**
30: * @param variable The variable name
31: *
32: * @return the ValueExpression assigned to the variable, null if there is no previous assignment to this variable.
33: */
34: public abstract ValueExpression resolveVariable(String variable);
35:
36: /**
37: * Assign a ValueExpression to an Jakarta Expression Language variable, replacing any previously assignment to the same
38: * variable. The assignment for the variable is removed if the expression is <code>null</code>.
39: *
40: * @param variable The variable name
41: * @param expression The ValueExpression to be assigned to the variable.
42: *
43: * @return The previous ValueExpression assigned to this variable, null if there is no previous assignment to this
44: * variable.
45: */
46: public abstract ValueExpression setVariable(String variable, ValueExpression expression);
47: }