KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xpath > internal > ExpressionNode


1 /*
2  * Copyright 1999-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 /*
17  * $Id: ExpressionNode.java,v 1.3 2004/02/17 04:30:02 minchau Exp $
18  */

19 package com.sun.org.apache.xpath.internal;
20
21 import javax.xml.transform.SourceLocator JavaDoc;
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 JavaDoc
33 {
34   /** This pair of methods are used to inform the node of its
35     parent. */

36   public void exprSetParent(ExpressionNode n);
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 }
50
51
Popular Tags