1/*
2 * reserved comment block
3 * DO NOT REMOVE OR ALTER!
4 */
5/*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements.  See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License.  You may obtain a copy of the License at
12 *
13 *      http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22package com.sun.org.apache.xpath.internal;
23
24import javax.xml.transform.SourceLocator;
25
26/**
27 * A class that implements this interface can construct expressions,
28 * give information about child and parent expressions,
29 * and give the originating source information.  A class that implements
30 * this interface does not lay any claim to being directly executable.
31 *
32 * <p>Note: This interface should not be considered stable.  Only exprSetParent
33 * and exprGetParent can be counted on to work reliably.  Work in progress.</p>
34 */
35public interface ExpressionNode extends SourceLocator
36{
37  /** This pair of methods are used to inform the node of its
38    parent. */
39  public void exprSetParent(ExpressionNode n);
40  public ExpressionNode exprGetParent();
41
42  /** This method tells the node to add its argument to the node's
43    list of children.  */
44  public void exprAddChild(ExpressionNode n, int i);
45
46  /** This method returns a child node.  The children are numbered
47     from zero, left to right. */
48  public ExpressionNode exprGetChild(int i);
49
50  /** Return the number of children the node has. */
51  public int exprGetNumChildren();
52}
53