KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > script > Expression


1 /*
2  * Copyright 2004 The Apache Software Foundation.
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  * $Header:$
17  */

18 package org.apache.beehive.netui.script;
19
20 // java imports
21

22 import java.util.List JavaDoc;
23
24 // internal imports
25

26 // external imports
27

28 /**
29  * This class implements an abstraction atop an Expression object.
30  * It provides access to metadata about the parsed expression
31  * including the data binding context and tokens that constitute
32  * the expression.
33  */

34 public abstract class Expression {
35
36     /**
37      * Get the expression's data binding context.
38      */

39     public abstract String JavaDoc getContext();
40
41     /**
42      * Get the expression's token list. For an expression that looks like
43      * "actionForm.customer.name", this will include the tokens "actionForm",
44      * "customer", and "name".
45      */

46     public abstract List JavaDoc getTokens();
47
48     /**
49      * Return an expression that is created starting with the
50      * token at the given index.
51      *
52      * @throws {@link java.lang.IllegalStateException} if the provided start token is out of bounds
53      * given the number of tokens in the expression
54      */

55     public abstract String JavaDoc getExpression(int start);
56 }
57
Popular Tags