KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > binding > expression > ExpressionParser


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.springframework.binding.expression;
17
18 /**
19  * Parses expression strings, returing a configured evaluator instance capable
20  * of performing parsed expression evaluation in a thread safe way.
21  *
22  * @author Keith Donald
23  */

24 public interface ExpressionParser {
25
26     /**
27      * Is this expression string delimited in a manner that indicates it is a
28      * parseable expression? For example ${expression}.
29      * @param expressionString the proposed expression string
30      * @return true if yes, false if not
31      */

32     public boolean isDelimitedExpression(String JavaDoc expressionString);
33
34     /**
35      * Parse the provided expression string, returning an evaluator capable of
36      * evaluating it against input.
37      * @param expressionString the parseable expression
38      * @return the evaluator for the parsed expression
39      * @throws ParserException an exception occured during parsing
40      */

41     public Expression parseExpression(String JavaDoc expressionString) throws ParserException;
42
43     /**
44      * Parse the provided property expression string, returning an evaluator
45      * capable of evaluating its value as well as setting its value.
46      * @param expressionString the parseable expression string
47      * @return the evaluator for the parsed expression
48      * @throws ParserException an exception occured during parsing
49      * @throws UnsupportedOperationException this parser does not support
50      * property expressions
51      */

52     public SettableExpression parseSettableExpression(String JavaDoc expressionString) throws ParserException,
53             UnsupportedOperationException JavaDoc;
54
55 }
Popular Tags