001: package org.apache.ojb.jdo.jdoql;
002:
003: /* Copyright 2003-2005 The Apache Software Foundation
004: *
005: * Licensed under the Apache License, Version 2.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: import java.util.List;
019:
020: /**
021: * Denotes types that visit the jdoql expression trees.
022: *
023: * @author <a href="mailto:tomdz@apache.org">Thomas Dudziak</a>
024: */
025: public interface Visitor {
026: /**
027: * Processes the variable declarations.
028: *
029: * @param variables The variables
030: */
031: public void visitVariables(List variables);
032:
033: /**
034: * Processes the parameter declarations.
035: *
036: * @param params The parameters
037: */
038: public void visitParameters(List params);
039:
040: /**
041: * Processes the orderings.
042: *
043: * @param orderings The orderings
044: */
045: public void visitOrderings(List orderings);
046:
047: /**
048: * Processes the filter expression.
049: *
050: * @param filterExpr The filter expression
051: */
052: public void visitFilter(Expression filterExpr);
053:
054: /**
055: * Processes the given binary expression.
056: *
057: * @param binExpr The binary expression to process
058: */
059: void visit(BinaryExpression binExpr);
060:
061: /**
062: * Processes the given field access expression.
063: *
064: * @param fieldAccess The field access to process
065: */
066: void visit(FieldAccess fieldAccess);
067:
068: /**
069: * Processes the given import specification.
070: *
071: * @param nullLit The import specification to process
072: */
073: void visit(Import importSpec);
074:
075: /**
076: * Processes the given literal.
077: *
078: * @param literal The literal to process
079: */
080: void visit(Literal literal);
081:
082: /**
083: * Processes the given local variable declaration.
084: *
085: * @param localVar The local variable declaration to process
086: */
087: void visit(LocalVariable localVar);
088:
089: /**
090: * Processes the given local variable access expression.
091: *
092: * @param localVarAccess The local variable access expression to process
093: */
094: void visit(LocalVariableAccess localVarAccess);
095:
096: /**
097: * Processes the given method invocation expression.
098: *
099: * @param methodInvoc The method invocation expression to process
100: */
101: void visit(MethodInvocation methodInvoc);
102:
103: /**
104: * Processes the given name expression.
105: *
106: * @param varAccess The name expression to process
107: */
108: void visit(NameExpression nameExpr);
109:
110: /**
111: * Processes the given <code>null</code> literal.
112: *
113: * @param nullLit The <code>null</code> literal to process
114: */
115: void visit(NullLiteral nullLit);
116:
117: /**
118: * Processes the given ordering.
119: *
120: * @param ordering The ordering to process
121: */
122: void visit(Ordering ordering);
123:
124: /**
125: * Processes the given <code>this</code> expression.
126: *
127: * @param thisExpr The <code>this</code> expression to process
128: */
129: void visit(ThisExpression this Expr);
130:
131: /**
132: * Processes the given type.
133: *
134: * @param type The type to process
135: */
136: void visit(Type type);
137:
138: /**
139: * Processes the given type access expression.
140: *
141: * @param type The type access expression to process
142: */
143: void visit(TypeAccess typeAccess);
144:
145: /**
146: * Processes the given unary expression.
147: *
148: * @param unaryExpr The unary expression to process
149: */
150: void visit(UnaryExpression unaryExpr);
151: }
|