1 /*2 * The contents of this file are subject to the terms of the Common Development3 * and Distribution License (the License). You may not use this file except in4 * compliance with the License.5 * 6 * You can obtain a copy of the License at http://www.netbeans.org/cddl.html7 * or http://www.netbeans.org/cddl.txt.8 * 9 * When distributing Covered Code, include this CDDL Header Notice in each file10 * and include the License file at http://www.netbeans.org/cddl.txt.11 * If applicable, add the following below the CDDL Header, with the fields12 * enclosed by brackets [] replaced by your own identifying information:13 * "Portions Copyrighted [year] [name of copyright owner]"14 * 15 * The Original Software is NetBeans. The Initial Developer of the Original16 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun17 * Microsystems, Inc. All Rights Reserved.18 */19 20 package org.netbeans.modules.xml.xpath.visitor;21 22 import org.netbeans.modules.xml.xpath.LocationStep;23 import org.netbeans.modules.xml.xpath.XPathCoreFunction;24 import org.netbeans.modules.xml.xpath.XPathCoreOperation;25 import org.netbeans.modules.xml.xpath.XPathExpressionPath;26 import org.netbeans.modules.xml.xpath.XPathExtensionFunction;27 import org.netbeans.modules.xml.xpath.XPathLocationPath;28 import org.netbeans.modules.xml.xpath.XPathNumericLiteral;29 import org.netbeans.modules.xml.xpath.XPathPredicateExpression;30 import org.netbeans.modules.xml.xpath.XPathStringLiteral;31 import org.netbeans.modules.xml.xpath.XPathVariableReference;32 33 /**34 * Visitor interface.35 * 36 * @author sbyn37 * @version $Revision: 1.4 $38 */39 public interface XPathVisitor {40 41 /**42 * Visits an location step.43 * @param locationStep to visit44 */45 void visit(LocationStep locationStep);46 47 /**48 * Visits a string literal.49 * @param stringLiteral to visit50 * @return must be false since string literals don't have children51 */52 void visit(XPathStringLiteral stringLiteral);53 54 55 /**56 * Visits a numeric literal.57 * @param numericLiteral to visit58 */59 void visit(XPathNumericLiteral numericLiteral);60 61 62 /**63 * Visits a location path.64 * @param locationPath to visit65 */66 void visit(XPathLocationPath locationPath);67 68 /**69 * Visits a expression path.70 * @param expressionPath to visit71 */72 void visit(XPathExpressionPath expressionPath);73 74 75 /**76 * Visits a core operation.77 * @param coreOperation to visit78 */79 void visit(XPathCoreOperation coreOperation);80 81 82 /**83 * Visits a core function.84 * @param coreFunction to visit85 */86 void visit(XPathCoreFunction coreFunction);87 88 89 /**90 * Visits an extension function.91 * @param extensionFunction to visit92 */93 void visit(XPathExtensionFunction extensionFunction);94 95 /**96 * Visits a Variable97 * @param vReference98 */99 void visit(XPathVariableReference vReference);100 101 /**102 * visit a predicate (predicates are inside [] in a location/expression path)103 * @param predicate104 */105 void visit(XPathPredicateExpression predicate);106 107 }108