KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > el > lang > EvaluationContext


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.el.lang;
19
20 import javax.el.ELContext;
21 import javax.el.ELResolver;
22 import javax.el.FunctionMapper;
23 import javax.el.VariableMapper;
24
25 public final class EvaluationContext extends ELContext {
26
27     private final ELContext elContext;
28
29     private final FunctionMapper fnMapper;
30
31     private final VariableMapper varMapper;
32
33     public EvaluationContext(ELContext elContext, FunctionMapper fnMapper,
34             VariableMapper varMapper) {
35         this.elContext = elContext;
36         this.fnMapper = fnMapper;
37         this.varMapper = varMapper;
38     }
39
40     public ELContext getELContext() {
41         return this.elContext;
42     }
43
44     public FunctionMapper getFunctionMapper() {
45         return this.fnMapper;
46     }
47
48     public VariableMapper getVariableMapper() {
49         return this.varMapper;
50     }
51
52     public Object JavaDoc getContext(Class JavaDoc key) {
53         return this.elContext.getContext(key);
54     }
55
56     public ELResolver getELResolver() {
57         return this.elContext.getELResolver();
58     }
59
60     public boolean isPropertyResolved() {
61         return this.elContext.isPropertyResolved();
62     }
63
64     public void putContext(Class JavaDoc key, Object JavaDoc contextObject) {
65         this.elContext.putContext(key, contextObject);
66     }
67
68     public void setPropertyResolved(boolean resolved) {
69         this.elContext.setPropertyResolved(resolved);
70     }
71 }
72
Popular Tags