View Javadoc

    1   /***
    2    *
    3    * Copyright 2005 Jeremy Rayner
    4    *
    5    * Licensed under the Apache License, Version 2.0 (the "License");
    6    * you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    *
    9    * http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   *
    17   **/
    18  package org.codehaus.groovy.antlr.treewalker;
    19
    20  import org.codehaus.groovy.antlr.GroovySourceAST;
    21
    22  import java.util.Stack;
    23
    24  /***
    25   * A default implementation of all visitor methods.
    26   * If you extend this class, any un-overriden visit methods will
    27   * call visitDefault.
    28   *
    29   * @author <a href="mailto:groovy@ross-rayner.com">Jeremy Rayner</a>
    30   * @version $Revision: 1.2 $
    31   */
    32
    33  public class VisitorAdapter implements Visitor {
    34      public void setUp() {}
    35      public void visitAbstract(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    36      public void visitAnnotation(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    37      public void visitAnnotations(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    38      public void visitAnnotationArrayInit(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    39      public void visitAnnotationDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    40      public void visitAnnotationFieldDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    41      public void visitAnnotationMemberValuePair(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    42      public void visitArrayDeclarator(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    43      public void visitAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    44      public void visitAt(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    45      public void visitBand(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    46      public void visitBandAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    47      public void visitBigSuffix(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    48      public void visitBlock(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    49      public void visitBnot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    50      public void visitBor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    51      public void visitBorAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    52      public void visitBsr(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    53      public void visitBsrAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    54      public void visitBxor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    55      public void visitBxorAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    56      public void visitCaseGroup(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    57      public void visitClassDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    58      public void visitClosedBlock(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    59      public void visitClosureOp(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    60      public void visitColon(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    61      public void visitComma(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    62      public void visitCompareTo(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    63      public void visitCtorCall(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    64      public void visitCtorIdent(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    65      public void visitDec(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    66      public void visitDigit(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    67      public void visitDiv(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    68      public void visitDivAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    69      public void visitDollar(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    70      public void visitDot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    71      public void visitDynamicMember(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    72      public void visitElist(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    73      public void visitEmptyStat(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    74      public void visitEnumConstantDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    75      public void visitEnumDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    76      public void visitEof(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    77      public void visitEqual(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    78      public void visitEsc(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    79      public void visitExponent(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    80      public void visitExpr(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    81      public void visitExtendsClause(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    82      public void visitFinal(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    83      public void visitFloatSuffix(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    84      public void visitForCondition(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    85      public void visitForEachClause(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    86      public void visitForInit(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    87      public void visitForInIterable(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    88      public void visitForIterator(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    89      public void visitGe(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    90      public void visitGt(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    91      public void visitHexDigit(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    92      public void visitIdent(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    93      public void visitImplementsClause(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    94      public void visitImplicitParameters(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    95      public void visitImport(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    96      public void visitInc(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    97      public void visitIndexOp(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    98      public void visitInstanceInit(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    99      public void visitInterfaceDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    100     public void visitLabeledArg(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    101     public void visitLabeledStat(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    102     public void visitLand(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    103     public void visitLbrack(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    104     public void visitLcurly(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    105     public void visitLe(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    106     public void visitLetter(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    107     public void visitListConstructor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    108     public void visitLiteralAny(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    109     public void visitLiteralAs(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    110     public void visitLiteralAssert(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    111     public void visitLiteralBoolean(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    112     public void visitLiteralBreak(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    113     public void visitLiteralByte(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    114     public void visitLiteralCase(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    115     public void visitLiteralCatch(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    116     public void visitLiteralChar(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    117     public void visitLiteralClass(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    118     public void visitLiteralContinue(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    119     public void visitLiteralDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    120     public void visitLiteralDefault(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    121     public void visitLiteralDouble(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    122     public void visitLiteralElse(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    123     public void visitLiteralEnum(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    124     public void visitLiteralExtends(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    125     public void visitLiteralFalse(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    126     public void visitLiteralFinally(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    127     public void visitLiteralFloat(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    128     public void visitLiteralFor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    129     public void visitLiteralIf(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    130     public void visitLiteralImplements(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    131     public void visitLiteralImport(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    132     public void visitLiteralIn(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    133     public void visitLiteralInstanceof(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    134     public void visitLiteralInt(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    135     public void visitLiteralInterface(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    136     public void visitLiteralLong(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    137     public void visitLiteralNative(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    138     public void visitLiteralNew(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    139     public void visitLiteralNull(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    140     public void visitLiteralPackage(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    141     public void visitLiteralPrivate(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    142     public void visitLiteralProtected(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    143     public void visitLiteralPublic(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    144     public void visitLiteralReturn(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    145     public void visitLiteralShort(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    146     public void visitLiteralStatic(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    147     public void visitLiteralSuper(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    148     public void visitLiteralSwitch(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    149     public void visitLiteralSynchronized(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    150     public void visitLiteralThis(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    151     public void visitLiteralThreadsafe(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    152     public void visitLiteralThrow(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    153     public void visitLiteralThrows(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    154     public void visitLiteralTransient(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    155     public void visitLiteralTrue(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    156     public void visitLiteralTry(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    157     public void visitLiteralVoid(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    158     public void visitLiteralVolatile(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    159     public void visitLiteralWhile(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    160     public void visitLiteralWith(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    161     public void visitLnot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    162     public void visitLor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    163     public void visitLparen(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    164     public void visitLt(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    165     public void visitMapConstructor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    166     public void visitMemberPointer(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    167     public void visitMethodCall(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    168     public void visitMethodDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    169     public void visitMinus(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    170     public void visitMinusAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    171     public void visitMlComment(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    172     public void visitMod(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    173     public void visitModifiers(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    174     public void visitModAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    175     public void visitNls(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    176     public void visitNotEqual(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    177     public void visitNullTreeLookahead(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    178     public void visitNumBigDecimal(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    179     public void visitNumBigInt(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    180     public void visitNumDouble(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    181     public void visitNumFloat(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    182     public void visitNumInt(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    183     public void visitNumLong(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    184     public void visitObjblock(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    185     public void visitOneNl(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    186     public void visitOptionalDot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    187     public void visitPackageDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    188     public void visitParameters(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    189     public void visitParameterDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    190     public void visitPlus(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    191     public void visitPlusAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    192     public void visitPostDec(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    193     public void visitPostInc(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    194     public void visitQuestion(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    195     public void visitRangeExclusive(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    196     public void visitRangeInclusive(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    197     public void visitRbrack(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    198     public void visitRcurly(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    199     public void visitRegexpCtorEnd(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    200     public void visitRegexpLiteral(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    201     public void visitRegexpSymbol(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    202     public void visitRegexFind(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    203     public void visitRegexMatch(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    204     public void visitRparen(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    205     public void visitScopeEscape(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    206     public void visitSelectSlot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    207     public void visitSemi(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    208     public void visitShComment(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    209     public void visitSl(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    210     public void visitSlist(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    211     public void visitSlAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    212     public void visitSlComment(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    213     public void visitSpreadArg(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    214     public void visitSpreadDot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    215     public void visitSpreadMapArg(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    216     public void visitSr(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    217     public void visitSrAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    218     public void visitStar(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    219     public void visitStarAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    220     public void visitStarStar(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    221     public void visitStarStarAssign(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    222     public void visitStaticImport(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    223     public void visitStaticInit(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    224     public void visitStrictfp(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    225     public void visitStringCh(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    226     public void visitStringConstructor(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    227     public void visitStringCtorEnd(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    228     public void visitStringCtorMiddle(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    229     public void visitStringCtorStart(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    230     public void visitStringLiteral(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    231     public void visitStringNl(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    232     public void visitSuperCtorCall(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    233     public void visitTripleDot(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    234     public void visitType(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    235     public void visitTypecast(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    236     public void visitTypeArgument(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    237     public void visitTypeArguments(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    238     public void visitTypeLowerBounds(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    239     public void visitTypeParameter(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    240     public void visitTypeParameters(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    241     public void visitTypeUpperBounds(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    242     public void visitUnaryMinus(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    243     public void visitUnaryPlus(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    244     public void visitUnusedConst(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    245     public void visitUnusedDo(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    246     public void visitUnusedGoto(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    247     public void visitVariableDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    248     public void visitVariableParameterDef(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    249     public void visitVocab(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    250     public void visitWildcardType(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    251     public void visitWs(GroovySourceAST t,int visit) {visitDefault(t,visit);}
    252
    253     public void visitDefault(GroovySourceAST t,int visit) {}
    254     public void tearDown() {}
    255
    256     public void push(GroovySourceAST t) {}
    257     public GroovySourceAST pop() {return null;}
    258 }
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273