001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.xml.xpath.ext.visitor;
021:
022: import org.netbeans.modules.xml.xpath.ext.LocationStep;
023: import org.netbeans.modules.xml.xpath.ext.XPathCoreFunction;
024: import org.netbeans.modules.xml.xpath.ext.XPathCoreOperation;
025: import org.netbeans.modules.xml.xpath.ext.XPathExpressionPath;
026: import org.netbeans.modules.xml.xpath.ext.XPathExtensionFunction;
027: import org.netbeans.modules.xml.xpath.ext.XPathLocationPath;
028: import org.netbeans.modules.xml.xpath.ext.XPathNumericLiteral;
029: import org.netbeans.modules.xml.xpath.ext.XPathPredicateExpression;
030: import org.netbeans.modules.xml.xpath.ext.XPathStringLiteral;
031: import org.netbeans.modules.xml.xpath.ext.XPathVariableReference;
032:
033: /**
034: * Visitor interface.
035: *
036: * @author sbyn
037: * @version
038: */
039: public interface XPathVisitor {
040:
041: /**
042: * Visits an location step.
043: * @param locationStep to visit
044: */
045: void visit(LocationStep locationStep);
046:
047: /**
048: * Visits a string literal.
049: * @param stringLiteral to visit
050: * @return must be false since string literals don't have children
051: */
052: void visit(XPathStringLiteral stringLiteral);
053:
054: /**
055: * Visits a numeric literal.
056: * @param numericLiteral to visit
057: */
058: void visit(XPathNumericLiteral numericLiteral);
059:
060: /**
061: * Visits a location path.
062: * @param locationPath to visit
063: */
064: void visit(XPathLocationPath locationPath);
065:
066: /**
067: * Visits a expression path.
068: * @param expressionPath to visit
069: */
070: void visit(XPathExpressionPath expressionPath);
071:
072: /**
073: * Visits a core operation.
074: * @param coreOperation to visit
075: */
076: void visit(XPathCoreOperation coreOperation);
077:
078: /**
079: * Visits a core function.
080: * @param coreFunction to visit
081: */
082: void visit(XPathCoreFunction coreFunction);
083:
084: /**
085: * Visits an extension function.
086: * @param extensionFunction to visit
087: */
088: void visit(XPathExtensionFunction extensionFunction);
089:
090: /**
091: * Visits a Variable
092: * @param vReference
093: */
094: void visit(XPathVariableReference vReference);
095:
096: /**
097: * visit a predicate (predicates are inside [] in a location/expression path)
098: * @param predicate
099: */
100: void visit(XPathPredicateExpression predicate);
101:
102: }
|