01: /*
02: * Copyright 1999-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: /*
17: * $Id: ExpressionNode.java,v 1.3 2004/02/17 04:30:02 minchau Exp $
18: */
19: package org.apache.xpath;
20:
21: import javax.xml.transform.SourceLocator;
22:
23: /**
24: * A class that implements this interface can construct expressions,
25: * give information about child and parent expressions,
26: * and give the originating source information. A class that implements
27: * this interface does not lay any claim to being directly executable.
28: *
29: * <p>Note: This interface should not be considered stable. Only exprSetParent
30: * and exprGetParent can be counted on to work reliably. Work in progress.</p>
31: */
32: public interface ExpressionNode extends SourceLocator {
33: /** This pair of methods are used to inform the node of its
34: parent. */
35: public void exprSetParent(ExpressionNode n);
36:
37: public ExpressionNode exprGetParent();
38:
39: /** This method tells the node to add its argument to the node's
40: list of children. */
41: public void exprAddChild(ExpressionNode n, int i);
42:
43: /** This method returns a child node. The children are numbered
44: from zero, left to right. */
45: public ExpressionNode exprGetChild(int i);
46:
47: /** Return the number of children the node has. */
48: public int exprGetNumChildren();
49: }
|