Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ExpressionCache |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation | |
2 | // | |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | // you may not use this file except in compliance with the License. | |
5 | // You may obtain a copy of the License at | |
6 | // | |
7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
8 | // | |
9 | // Unless required by applicable law or agreed to in writing, software | |
10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | // See the License for the specific language governing permissions and | |
13 | // limitations under the License. | |
14 | ||
15 | package org.apache.tapestry.services; | |
16 | ||
17 | /** | |
18 | * Cache of compiled OGNL expressions. | |
19 | * | |
20 | * @author Howard M. Lewis Ship | |
21 | * @since 4.0 | |
22 | */ | |
23 | public interface ExpressionCache | |
24 | { | |
25 | ||
26 | /** | |
27 | * Returns the compiled form of the OGNL expression. | |
28 | * | |
29 | * @throws org.apache.hivemind.ApplicationRuntimeException | |
30 | * if the expression is not valid | |
31 | */ | |
32 | Object getCompiledExpression(String expression); | |
33 | ||
34 | /** | |
35 | * Returns the compiled ognl expression for the given target object class / expression | |
36 | * combination. | |
37 | * | |
38 | * @param target | |
39 | * The object this expression is to be used for. | |
40 | * @param expression | |
41 | * The expression. | |
42 | * @return | |
43 | * The compiled (or new if neccessary) ognl statement. | |
44 | */ | |
45 | Object getCompiledExpression(Object target, String expression); | |
46 | } |