Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

LineExtractor.java

00001 package edu.ksu.cis.bandera.jjjc.decompiler;
00002 
00003 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00004  * Bandera, a Java(TM) analysis and transformation toolkit           *
00005  * Copyright (C) 1999, 2000   Robby (robby@cis.ksu.edu)              *
00006  * All rights reserved.                                              *
00007  *                                                                   *
00008  * This work was done as a project in the SAnToS Laboratory,         *
00009  * Department of Computing and Information Sciences, Kansas State    *
00010  * University, USA (http://www.cis.ksu.edu/santos).                  *
00011  * It is understood that any modification not identified as such is  *
00012  * not covered by the preceding statement.                           *
00013  *                                                                   *
00014  * This work is free software; you can redistribute it and/or        *
00015  * modify it under the terms of the GNU Library General Public       *
00016  * License as published by the Free Software Foundation; either      *
00017  * version 2 of the License, or (at your option) any later version.  *
00018  *                                                                   *
00019  * This work is distributed in the hope that it will be useful,      *
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *
00022  * Library General Public License for more details.                  *
00023  *                                                                   *
00024  * You should have received a copy of the GNU Library General Public *
00025  * License along with this toolkit; if not, write to the             *
00026  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,      *
00027  * Boston, MA  02111-1307, USA.                                      *
00028  *                                                                   *
00029  * Java is a trademark of Sun Microsystems, Inc.                     *
00030  *                                                                   *
00031  * To submit a bug report, send a comment, or get the latest news on *
00032  * this project and other SAnToS projects, please visit the web-site *
00033  *                http://www.cis.ksu.edu/santos                      *
00034  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00035 import edu.ksu.cis.bandera.jjjc.analysis.*;
00036 import edu.ksu.cis.bandera.jjjc.node.*;
00037 public class LineExtractor extends DepthFirstAdapter {
00038     private static LineExtractor extractor = new LineExtractor();
00039     private int line;
00040 /**
00041  * 
00042  */
00043 private LineExtractor() {}
00044 /**
00045  * 
00046  * @param node edu.ksu.cis.bandera.jjjc.node.AAbstractModifier
00047  */
00048 public void caseAAbstractModifier(AAbstractModifier node) {
00049     line = node.getAbstract().getLine();
00050 }
00051 /**
00052  * 
00053  * @param node edu.ksu.cis.bandera.jjjc.node.AArrayAccessExp
00054  */
00055 public void caseAArrayAccessExp(AArrayAccessExp node) {
00056     node.getArrayAccess().apply(this);
00057 }
00058 /**
00059  * 
00060  * @param node edu.ksu.cis.bandera.jjjc.node.AAssignmentExp
00061  */
00062 public void caseAAssignmentExp(AAssignmentExp node) {
00063     node.getLeftHandSide().apply(this);
00064 }
00065 /**
00066  * 
00067  * @param node edu.ksu.cis.bandera.jjjc.node.ABinaryExp
00068  */
00069 public void caseABinaryExp(ABinaryExp node) {
00070     node.getFirst().apply(this);
00071 }
00072 /**
00073  * 
00074  * @param node edu.ksu.cis.bandera.jjjc.node.ABitComplementUnaryOperator
00075  */
00076 public void caseABitComplementUnaryOperator(ABitComplementUnaryOperator node) {
00077     line = node.getBitComplement().getLine();
00078 }
00079 /**
00080  * 
00081  * @param node edu.ksu.cis.bandera.jjjc.node.ABlockStmt
00082  */
00083 public void caseABlockStmt(ABlockStmt node) {
00084     line = ((ABlock) node.getBlock()).getLBrace().getLine();
00085 }
00086 /**
00087  * 
00088  * @param node edu.ksu.cis.bandera.jjjc.node.ABooleanPrimitiveType
00089  */
00090 public void caseABooleanPrimitiveType(ABooleanPrimitiveType node) {
00091     line = node.getBoolean().getLine();
00092 }
00093 /**
00094  * 
00095  * @param node edu.ksu.cis.bandera.jjjc.node.ABreakStmt
00096  */
00097 public void caseABreakStmt(ABreakStmt node) {
00098     line = node.getBreak().getLine();
00099 }
00100 /**
00101  * 
00102  * @param node edu.ksu.cis.bandera.jjjc.node.ABytePrimitiveType
00103  */
00104 public void caseABytePrimitiveType(ABytePrimitiveType node) {
00105     line = node.getByte().getLine();
00106 }
00107 /**
00108  * 
00109  * @param node edu.ksu.cis.bandera.jjjc.node.ACatchClause
00110  */
00111 public void caseACatchClause(ACatchClause node) {
00112     line = node.getCatch().getLine();
00113 }
00114 /**
00115  * 
00116  * @param node edu.ksu.cis.bandera.jjjc.node.ACharacterLiteralLiteral
00117  */
00118 public void caseACharacterLiteralLiteral(ACharacterLiteralLiteral node) {
00119     line = node.getCharacterLiteral().getLine();
00120 }
00121 /**
00122  * 
00123  * @param node edu.ksu.cis.bandera.jjjc.node.ACharPrimitiveType
00124  */
00125 public void caseACharPrimitiveType(ACharPrimitiveType node) {
00126     line = node.getChar().getLine();
00127 }
00128 /**
00129  * 
00130  * @param node edu.ksu.cis.bandera.jjjc.node.AClassDeclaration
00131  */
00132 public void caseAClassDeclaration(AClassDeclaration node) {
00133     line = node.getId().getLine();
00134 }
00135 /**
00136  * 
00137  * @param node edu.ksu.cis.bandera.jjjc.node.AClassOrInterfaceTypeExp
00138  */
00139 public void caseAClassOrInterfaceTypeExp(AClassOrInterfaceTypeExp node) {
00140     line = node.getNew().getLine();
00141 }
00142 /**
00143  * 
00144  * @param node edu.ksu.cis.bandera.jjjc.node.AComplementUnaryOperator
00145  */
00146 public void caseAComplementUnaryOperator(AComplementUnaryOperator node) {
00147     line = node.getComplement().getLine();
00148 }
00149 /**
00150  * 
00151  * @param node edu.ksu.cis.bandera.jjjc.node.AConstructorDeclaration
00152  */
00153 public void caseAConstructorDeclaration(AConstructorDeclaration node) {
00154     Object temp[] = node.getModifier().toArray();
00155     if (temp.length > 0)
00156         ((PModifier) temp[0]).apply(this);
00157     else
00158         node.getConstructorDeclarator().apply(this);
00159 }
00160 /**
00161  * 
00162  * @param node edu.ksu.cis.bandera.jjjc.node.AConstructorDeclarator
00163  */
00164 public void caseAConstructorDeclarator(AConstructorDeclarator node) {
00165     //line = node.getSimpleName().getLine();
00166     node.getSimpleName().apply(this);
00167 }
00168 /**
00169  * 
00170  * @param node edu.ksu.cis.bandera.jjjc.node.AContinueStmt
00171  */
00172 public void caseAContinueStmt(AContinueStmt node) {
00173     line = node.getContinue().getLine();
00174 }
00175 /**
00176  * 
00177  * @param node edu.ksu.cis.bandera.jjjc.node.ADecimalIntegerLiteral
00178  */
00179 public void caseADecimalIntegerLiteral(ADecimalIntegerLiteral node) {
00180     line = node.getDecimalIntegerLiteral().getLine();
00181 }
00182 /**
00183  * 
00184  * @param node edu.ksu.cis.bandera.jjjc.node.ADecrementUnaryOperator
00185  */
00186 public void caseADecrementUnaryOperator(ADecrementUnaryOperator node) {
00187     line = node.getMinusMinus().getLine();
00188 }
00189 /**
00190  * 
00191  * @param node edu.ksu.cis.bandera.jjjc.node.ADoStmt
00192  */
00193 public void caseADoStmt(ADoStmt node) {
00194     line = node.getDo().getLine();
00195 }
00196 /**
00197  * 
00198  * @param node edu.ksu.cis.bandera.jjjc.node.ADoublePrimitiveType
00199  */
00200 public void caseADoublePrimitiveType(ADoublePrimitiveType node) {
00201     line = node.getDouble().getLine();
00202 }
00203 /**
00204  * 
00205  * @param node edu.ksu.cis.bandera.jjjc.node.AEmptyStmt
00206  */
00207 public void caseAEmptyStmt(AEmptyStmt node) {
00208     line = node.getSemicolon().getLine();
00209 }
00210 /**
00211  * 
00212  * @param node edu.ksu.cis.bandera.jjjc.node.AExpCastExp
00213  */
00214 public void caseAExpCastExp(AExpCastExp node) {
00215     line = node.getLPar().getLine();
00216 }
00217 /**
00218  * 
00219  * @param node edu.ksu.cis.bandera.jjjc.node.AExpStmt
00220  */
00221 public void caseAExpStmt(AExpStmt node) {
00222     node.getExp().apply(this);
00223 }
00224 /**
00225  * 
00226  * @param node edu.ksu.cis.bandera.jjjc.node.AFalseBooleanLiteral
00227  */
00228 public void caseAFalseBooleanLiteral(AFalseBooleanLiteral node) {
00229     line = node.getFalse().getLine();
00230 }
00231 /**
00232  * 
00233  * @param node edu.ksu.cis.bandera.jjjc.node.AFieldAccessExp
00234  */
00235 public void caseAFieldAccessExp(AFieldAccessExp node) {
00236     node.getFieldAccess().apply(this);
00237 }
00238 /**
00239  * 
00240  * @param node edu.ksu.cis.bandera.jjjc.node.AFinalModifier
00241  */
00242 public void caseAFinalModifier(AFinalModifier node) {
00243     line = node.getFinal().getLine();
00244 }
00245 /**
00246  * 
00247  * @param node edu.ksu.cis.bandera.jjjc.node.AFloatingPointLiteralLiteral
00248  */
00249 public void caseAFloatingPointLiteralLiteral(AFloatingPointLiteralLiteral node) {
00250     line = node.getFloatingPointLiteral().getLine();
00251 }
00252 /**
00253  * 
00254  * @param node edu.ksu.cis.bandera.jjjc.node.AFloatPrimitiveType
00255  */
00256 public void caseAFloatPrimitiveType(AFloatPrimitiveType node) {
00257     line = node.getFloat().getLine();
00258 }
00259 /**
00260  * 
00261  * @param node edu.ksu.cis.bandera.jjjc.node.AForStmt
00262  */
00263 public void caseAForStmt(AForStmt node) {
00264     line = node.getFor().getLine();
00265 }
00266 /**
00267  * 
00268  * @param node edu.ksu.cis.bandera.jjjc.node.AHexIntegerLiteral
00269  */
00270 public void caseAHexIntegerLiteral(AHexIntegerLiteral node) {
00271     line = node.getHexIntegerLiteral().getLine();
00272 }
00273 /**
00274  * 
00275  * @param node edu.ksu.cis.bandera.jjjc.node.AIfStmt
00276  */
00277 public void caseAIfStmt(AIfStmt node) {
00278     line = node.getIf().getLine();
00279 }
00280 /**
00281  * 
00282  * @param node edu.ksu.cis.bandera.jjjc.node.AIncrementUnaryOperator
00283  */
00284 public void caseAIncrementUnaryOperator(AIncrementUnaryOperator node) {
00285     line = node.getPlusPlus().getLine();
00286 }
00287 /**
00288  * 
00289  * @param node edu.ksu.cis.bandera.jjjc.node.AInitClassInterfaceExp
00290  */
00291 public void caseAInitClassInterfaceExp(AInitClassInterfaceExp node) {
00292     line = node.getNew().getLine();
00293 }
00294 /**
00295  * 
00296  * @param node edu.ksu.cis.bandera.jjjc.node.AInitPrimitiveExp
00297  */
00298 public void caseAInitPrimitiveExp(AInitPrimitiveExp node) {
00299     line = node.getNew().getLine();
00300 }
00301 /**
00302  * 
00303  * @param node edu.ksu.cis.bandera.jjjc.node.AInstanceofExp
00304  */
00305 public void caseAInstanceofExp(AInstanceofExp node) {
00306     node.getExp().apply(this);
00307 }
00308 /**
00309  * 
00310  * @param node edu.ksu.cis.bandera.jjjc.node.AIntPrimitiveType
00311  */
00312 public void caseAIntPrimitiveType(AIntPrimitiveType node) {
00313     line = node.getInt().getLine();
00314 }
00315 /**
00316  * 
00317  * @param node edu.ksu.cis.bandera.jjjc.node.ALabelStmt
00318  */
00319 public void caseALabelStmt(ALabelStmt node) {
00320     line = node.getId().getLine();
00321 }
00322 /**
00323  * 
00324  * @param node edu.ksu.cis.bandera.jjjc.node.ALiteralExp
00325  */
00326 public void caseALiteralExp(ALiteralExp node) {
00327     node.getLiteral().apply(this);
00328 }
00329 /**
00330  * 
00331  * @param node edu.ksu.cis.bandera.jjjc.node.ALocalVariableDeclaration
00332  */
00333 public void caseALocalVariableDeclaration(ALocalVariableDeclaration node) {
00334     Object temp[] = node.getModifier().toArray();
00335     if (temp.length > 0) {
00336         ((PModifier) temp[0]).apply(this);
00337     } else {
00338         node.getType().apply(this);
00339     }
00340 }
00341 /**
00342  * 
00343  * @param node edu.ksu.cis.bandera.jjjc.node.ALocalVariableDeclarationInBlockedStmt
00344  */
00345 public void caseALocalVariableDeclarationInBlockedStmt(ALocalVariableDeclarationInBlockedStmt node) {
00346     node.getLocalVariableDeclaration().apply(this);
00347 }
00348 /**
00349  * 
00350  * @param node edu.ksu.cis.bandera.jjjc.node.ALongPrimitiveType
00351  */
00352 public void caseALongPrimitiveType(ALongPrimitiveType node) {
00353     line = node.getLong().getLine();
00354 }
00355 /**
00356  * 
00357  * @param node edu.ksu.cis.bandera.jjjc.node.AMethodDeclaration
00358  */
00359 public void caseAMethodDeclaration(AMethodDeclaration node) {
00360     node.getMethodHeader().apply(this);
00361 }
00362 /**
00363  * 
00364  * @param node edu.ksu.cis.bandera.jjjc.node.AMinusUnaryOperator
00365  */
00366 public void caseAMinusUnaryOperator(AMinusUnaryOperator node) {
00367     line = node.getMinus().getLine();
00368 }
00369 /**
00370  * 
00371  * @param node edu.ksu.cis.bandera.jjjc.node.ANameArrayAccess
00372  */
00373 public void caseANameArrayAccess(ANameArrayAccess node) {
00374     node.getName().apply(this);
00375 }
00376 /**
00377  * 
00378  * @param node edu.ksu.cis.bandera.jjjc.node.ANameCastExp
00379  */
00380 public void caseANameCastExp(ANameCastExp node) {
00381     line = node.getLPar().getLine();
00382 }
00383 /**
00384  * 
00385  * @param node edu.ksu.cis.bandera.jjjc.node.ANameExp
00386  */
00387 public void caseANameExp(ANameExp node) {
00388     node.getName().apply(this);
00389 }
00390 /**
00391  * 
00392  * @param node edu.ksu.cis.bandera.jjjc.node.ANameMethodInvocation
00393  */
00394 public void caseANameMethodInvocation(ANameMethodInvocation node) {
00395     node.getName().apply(this);
00396 }
00397 /**
00398  * 
00399  * @param node edu.ksu.cis.bandera.jjjc.node.ANativeModifier
00400  */
00401 public void caseANativeModifier(ANativeModifier node) {
00402     line = node.getNative().getLine();
00403 }
00404 /**
00405  * 
00406  * @param node edu.ksu.cis.bandera.jjjc.node.ANullLiteral
00407  */
00408 public void caseANullLiteral(ANullLiteral node) {
00409     line = node.getNull().getLine();
00410 }
00411 /**
00412  * 
00413  * @param node edu.ksu.cis.bandera.jjjc.node.AOctalIntegerLiteral
00414  */
00415 public void caseAOctalIntegerLiteral(AOctalIntegerLiteral node) {
00416     line = node.getOctalIntegerLiteral().getLine();
00417 }
00418 /**
00419  * 
00420  * @param node edu.ksu.cis.bandera.jjjc.node.AParExp
00421  */
00422 public void caseAParExp(AParExp node) {
00423     line = node.getLPar().getLine();
00424 }
00425 /**
00426  * 
00427  * @param node edu.ksu.cis.bandera.jjjc.node.APlusUnaryOperator
00428  */
00429 public void caseAPlusUnaryOperator(APlusUnaryOperator node) {
00430     line = node.getPlus().getLine();
00431 }
00432 /**
00433  * 
00434  * @param node edu.ksu.cis.bandera.jjjc.node.APostDecrementExp
00435  */
00436 public void caseAPostDecrementExp(APostDecrementExp node) {
00437     node.getExp().apply(this);
00438 }
00439 /**
00440  * 
00441  * @param node edu.ksu.cis.bandera.jjjc.node.APostIncrementExp
00442  */
00443 public void caseAPostIncrementExp(APostIncrementExp node) {
00444     node.getExp().apply(this);
00445 }
00446 /**
00447  * 
00448  * @param node edu.ksu.cis.bandera.jjjc.node.APrimaryFieldAccess
00449  */
00450 public void caseAPrimaryFieldAccess(APrimaryFieldAccess node) {
00451     node.getExp().apply(this);
00452 }
00453 /**
00454  * 
00455  * @param node edu.ksu.cis.bandera.jjjc.node.APrimaryMethodInvocation
00456  */
00457 public void caseAPrimaryMethodInvocation(APrimaryMethodInvocation node) {
00458     node.getPrimary().apply(this);
00459 }
00460 /**
00461  * 
00462  * @param node edu.ksu.cis.bandera.jjjc.node.APrimaryNoNewArrayArrayAccess
00463  */
00464 public void caseAPrimaryNoNewArrayArrayAccess(APrimaryNoNewArrayArrayAccess node) {
00465     node.getFirst().apply(this);
00466 }
00467 /**
00468  * 
00469  * @param node edu.ksu.cis.bandera.jjjc.node.APrimitiveTypeArrayExp
00470  */
00471 public void caseAPrimitiveTypeArrayExp(APrimitiveTypeArrayExp node) {
00472     line = node.getNew().getLine();
00473 }
00474 /**
00475  * 
00476  * @param node edu.ksu.cis.bandera.jjjc.node.APrimitiveTypeCastExp
00477  */
00478 public void caseAPrimitiveTypeCastExp(APrimitiveTypeCastExp node) {
00479     line = node.getLPar().getLine();
00480 }
00481 /**
00482  * 
00483  * @param node edu.ksu.cis.bandera.jjjc.node.APrimitiveTypePrimaryExp
00484  */
00485 public void caseAPrimitiveTypePrimaryExp(APrimitiveTypePrimaryExp node) {
00486     node.getPrimitiveType().apply(this);
00487 }
00488 /**
00489  * 
00490  * @param node edu.ksu.cis.bandera.jjjc.node.APrivateModifier
00491  */
00492 public void caseAPrivateModifier(APrivateModifier node) {
00493     line = node.getPrivate().getLine();
00494 }
00495 /**
00496  * 
00497  * @param node edu.ksu.cis.bandera.jjjc.node.AProtectedModifier
00498  */
00499 public void caseAProtectedModifier(AProtectedModifier node) {
00500     line = node.getProtected().getLine();
00501 }
00502 /**
00503  * 
00504  * @param node edu.ksu.cis.bandera.jjjc.node.APublicModifier
00505  */
00506 public void caseAPublicModifier(APublicModifier node) {
00507     line = node.getPublic().getLine();
00508 }
00509 /**
00510  * 
00511  * @param node edu.ksu.cis.bandera.jjjc.node.AQualifiedClassInstanceCreationExp
00512  */
00513 public void caseAQualifiedClassInstanceCreationExp(AQualifiedClassInstanceCreationExp node) {
00514     node.getExp().apply(this);
00515 }
00516 /**
00517  * 
00518  * @param node edu.ksu.cis.bandera.jjjc.node.AQualifiedConstructorInvocation
00519  */
00520 public void caseAQualifiedConstructorInvocation(AQualifiedConstructorInvocation node) {
00521     node.getExp().apply(this);
00522 }
00523 /**
00524  * 
00525  * @param node edu.ksu.cis.bandera.jjjc.node.AQualifiedName
00526  */
00527 public void caseAQualifiedName(AQualifiedName node) {
00528     node.getName().apply(this);
00529 }
00530 /**
00531  * 
00532  * @param node edu.ksu.cis.bandera.jjjc.node.AQualifiedThisExp
00533  */
00534 public void caseAQualifiedThisExp(AQualifiedThisExp node) {
00535     node.getName().apply(this);
00536 }
00537 /**
00538  * 
00539  * @param node edu.ksu.cis.bandera.jjjc.node.AQuestionExp
00540  */
00541 public void caseAQuestionExp(AQuestionExp node) {
00542     node.getFirst().apply(this);
00543 }
00544 /**
00545  * 
00546  * @param node edu.ksu.cis.bandera.jjjc.node.AReturnStmt
00547  */
00548 public void caseAReturnStmt(AReturnStmt node) {
00549     line = node.getReturn().getLine();
00550 }
00551 /**
00552  * 
00553  * @param node edu.ksu.cis.bandera.jjjc.node.AShortPrimitiveType
00554  */
00555 public void caseAShortPrimitiveType(AShortPrimitiveType node) {
00556     line = node.getShort().getLine();
00557 }
00558 /**
00559  * 
00560  * @param node edu.ksu.cis.bandera.jjjc.node.ASimpleClassInstanceCreationExp
00561  */
00562 public void caseASimpleClassInstanceCreationExp(ASimpleClassInstanceCreationExp node) {
00563     line = node.getNew().getLine();
00564 }
00565 /**
00566  * 
00567  * @param node edu.ksu.cis.bandera.jjjc.node.ASimpleName
00568  */
00569 public void caseASimpleName(ASimpleName node) {
00570     line = node.getId().getLine();
00571 }
00572 /**
00573  * 
00574  * @param node edu.ksu.cis.bandera.jjjc.node.AStaticModifier
00575  */
00576 public void caseAStaticModifier(AStaticModifier node) {
00577     line = node.getStatic().getLine();
00578 }
00579 /**
00580  * 
00581  * @param node edu.ksu.cis.bandera.jjjc.node.AStringLiteralLiteral
00582  */
00583 public void caseAStringLiteralLiteral(AStringLiteralLiteral node) {
00584     line = node.getStringLiteral().getLine();
00585 }
00586 /**
00587  * 
00588  * @param node edu.ksu.cis.bandera.jjjc.node.ASuperConstructorInvocation
00589  */
00590 public void caseASuperConstructorInvocation(ASuperConstructorInvocation node) {
00591     line = node.getSuper().getLine();
00592 }
00593 /**
00594  * 
00595  * @param node edu.ksu.cis.bandera.jjjc.node.ASuperFieldAccess
00596  */
00597 public void caseASuperFieldAccess(ASuperFieldAccess node) {
00598     line = node.getSuper().getLine();
00599 }
00600 /**
00601  * 
00602  * @param node edu.ksu.cis.bandera.jjjc.node.ASuperMethodInvocation
00603  */
00604 public void caseASuperMethodInvocation(ASuperMethodInvocation node) {
00605     line = node.getSuper().getLine();
00606 }
00607 /**
00608  * 
00609  * @param node edu.ksu.cis.bandera.jjjc.node.ASwitchStmt
00610  */
00611 public void caseASwitchStmt(ASwitchStmt node) {
00612     line = node.getSwitch().getLine();
00613 }
00614 /**
00615  * 
00616  * @param node edu.ksu.cis.bandera.jjjc.node.ASynchronizedModifier
00617  */
00618 public void caseASynchronizedModifier(ASynchronizedModifier node) {
00619     line = node.getSynchronized().getLine();
00620 }
00621 /**
00622  * 
00623  * @param node edu.ksu.cis.bandera.jjjc.node.ASynchronizedStmt
00624  */
00625 public void caseASynchronizedStmt(ASynchronizedStmt node) {
00626     line = node.getSynchronized().getLine();
00627 }
00628 /**
00629  * 
00630  * @param node edu.ksu.cis.bandera.jjjc.node.AThisConstructorInvocation
00631  */
00632 public void caseAThisConstructorInvocation(AThisConstructorInvocation node) {
00633     line = node.getThis().getLine();
00634 }
00635 /**
00636  * 
00637  * @param node edu.ksu.cis.bandera.jjjc.node.AThisExp
00638  */
00639 public void caseAThisExp(AThisExp node) {
00640     line = node.getThis().getLine();
00641 }
00642 /**
00643  * 
00644  * @param node edu.ksu.cis.bandera.jjjc.node.AThrowStmt
00645  */
00646 public void caseAThrowStmt(AThrowStmt node) {
00647     line = node.getThrow().getLine();
00648 }
00649 /**
00650  * 
00651  * @param node edu.ksu.cis.bandera.jjjc.node.ATransientModifier
00652  */
00653 public void caseATransientModifier(ATransientModifier node) {
00654     line = node.getTransient().getLine();
00655 }
00656 /**
00657  * 
00658  * @param node edu.ksu.cis.bandera.jjjc.node.ATrueBooleanLiteral
00659  */
00660 public void caseATrueBooleanLiteral(ATrueBooleanLiteral node) {
00661     line = node.getTrue().getLine();
00662 }
00663 /**
00664  * 
00665  * @param node edu.ksu.cis.bandera.jjjc.node.ATryFinallyStmt
00666  */
00667 public void caseATryFinallyStmt(ATryFinallyStmt node) {
00668     line = node.getTry().getLine();
00669 }
00670 /**
00671  * 
00672  * @param node edu.ksu.cis.bandera.jjjc.node.ATryStmt
00673  */
00674 public void caseATryStmt(ATryStmt node) {
00675     line = node.getTry().getLine();
00676 }
00677 /**
00678  * 
00679  * @param node edu.ksu.cis.bandera.jjjc.node.ATypedMethodHeader
00680  */
00681 public void caseATypedMethodHeader(ATypedMethodHeader node) {
00682     Object temp[] = node.getModifier().toArray();
00683     if (temp.length > 0)
00684          ((PModifier) temp[0]).apply(this);
00685     else
00686         node.getType().apply(this);
00687 }
00688 /**
00689  * 
00690  * @param node edu.ksu.cis.bandera.jjjc.node.AUnaryExp
00691  */
00692 public void caseAUnaryExp(AUnaryExp node) {
00693     node.getUnaryOperator().apply(this);
00694 }
00695 /**
00696  * 
00697  * @param node edu.ksu.cis.bandera.jjjc.node.AVariableDeclaratorId
00698  */
00699 public void caseAVariableDeclaratorId(AVariableDeclaratorId node) {
00700     line = node.getId().getLine();
00701 }
00702 /**
00703  * 
00704  * @param node edu.ksu.cis.bandera.jjjc.node.AVoidExp
00705  */
00706 public void caseAVoidExp(AVoidExp node) {
00707     line = node.getVoid().getLine();
00708 }
00709 /**
00710  * 
00711  * @param node edu.ksu.cis.bandera.jjjc.node.AVoidMethodHeader
00712  */
00713 public void caseAVoidMethodHeader(AVoidMethodHeader node) {
00714     Object temp[] = node.getModifier().toArray();
00715     if (temp.length > 0)
00716          ((PModifier) temp[0]).apply(this);
00717     else
00718         node.getVoid().apply(this);
00719 }
00720 /**
00721  * 
00722  * @param node edu.ksu.cis.bandera.jjjc.node.AVolatileModifier
00723  */
00724 public void caseAVolatileModifier(AVolatileModifier node) {
00725     line = node.getVolatile().getLine();
00726 }
00727 /**
00728  * 
00729  * @param node edu.ksu.cis.bandera.jjjc.node.AWhileStmt
00730  */
00731 public void caseAWhileStmt(AWhileStmt node) {
00732     line = node.getWhile().getLine();
00733 }
00734 /**
00735  * 
00736  * @return int
00737  * @param node edu.ksu.cis.bandera.jjjc.node.Node
00738  */
00739 public static int extractLine(Node node) {
00740     extractor.line = -1;
00741     node.apply(extractor);
00742     return extractor.line;
00743 }
00744 }

Generated at Thu Feb 7 06:49:34 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001