01: /* Generated By:JJTree: Do not edit this line. Node.java */
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one or more
05: * contributor license agreements. See the NOTICE file distributed with
06: * this work for additional information regarding copyright ownership.
07: * The ASF licenses this file to You under the Apache License, Version 2.0
08: * (the "License"); you may not use this file except in compliance with
09: * the License. You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19:
20: package org.apache.el.parser;
21:
22: import javax.el.ELException;
23: import javax.el.MethodInfo;
24:
25: import org.apache.el.lang.EvaluationContext;
26:
27: /* All AST nodes must implement this interface. It provides basic
28: machinery for constructing the parent and child relationships
29: between nodes. */
30:
31: /**
32: * @author Jacob Hookom [jacob@hookom.net]
33: * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
34: */
35: public interface Node {
36:
37: /** This method is called after the node has been made the current
38: node. It indicates that child nodes can now be added to it. */
39: public void jjtOpen();
40:
41: /** This method is called after all the child nodes have been
42: added. */
43: public void jjtClose();
44:
45: /** This pair of methods are used to inform the node of its
46: parent. */
47: public void jjtSetParent(Node n);
48:
49: public Node jjtGetParent();
50:
51: /** This method tells the node to add its argument to the node's
52: list of children. */
53: public void jjtAddChild(Node n, int i);
54:
55: /** This method returns a child node. The children are numbered
56: from zero, left to right. */
57: public Node jjtGetChild(int i);
58:
59: /** Return the number of children the node has. */
60: public int jjtGetNumChildren();
61:
62: public String getImage();
63:
64: public Object getValue(EvaluationContext ctx) throws ELException;
65:
66: public void setValue(EvaluationContext ctx, Object value)
67: throws ELException;
68:
69: public Class getType(EvaluationContext ctx) throws ELException;
70:
71: public boolean isReadOnly(EvaluationContext ctx) throws ELException;
72:
73: public void accept(NodeVisitor visitor) throws Exception;
74:
75: public MethodInfo getMethodInfo(EvaluationContext ctx,
76: Class[] paramTypes) throws ELException;
77:
78: public Object invoke(EvaluationContext ctx, Class[] paramTypes,
79: Object[] paramValues) throws ELException;
80: }
|