wt.tools.xref
Class IndexJavaSource

java.lang.Object
  extended bywt.tools.xref.IndexJavaSource
All Implemented Interfaces:
ProcessFileInterface

public class IndexJavaSource
extends Object
implements ProcessFileInterface

The following shows the 9 different Attributes and where they are used in Java .class files. ClassFile structure: InnerClasses, SourceFile, Deprecated FieldInfo structure: Synthetic, ConstantValue, Deprecated MethodInfo structure: Synthetic, Exceptions, Code, Deprecated Code attribute: LineNumberTable, LocalVariableTable


Field Summary
(package private)  String d_CrLf
           
(package private)  ClassInterface d_currentClass
           
(package private)  String d_currentPackageName
           
(package private)  Hashtable d_getFields
           
(package private)  Hashtable d_instantiations
           
(package private)  Hashtable d_localVariables
           
(package private)  Hashtable d_methodCalls
           
(package private)  String d_outputDirectory
           
(package private)  Hashtable d_putFields
           
(package private)  PrintWriter d_pw
           
(package private)  String d_startingDirectory
           
 
Constructor Summary
IndexJavaSource()
           
 
Method Summary
(package private)  void closeOutputFile()
           
(package private)  void directoryCheck(String dirName)
           
 boolean directoryNameOk(String directoryName)
          this method is provided so that the application can validate whether or not the specified directory is ok or not
(package private)  void displayFields(ClassFile cf)
          This method outputs the fields for the current class
(package private)  void displayInterfaces(ClassFile cf)
           
(package private)  void displayMethods(ClassFile cf)
           
(package private)  void displaySuperClass(ClassFile cf)
           
 boolean fileTypeOk(String fileName)
          This method is provided for the developer in case they do not want to process every single file in every directory.
(package private)  LineNumberAttrInfo getLineNumberAttrInfo(AttrInfoList ail)
           
(package private)  LineNumberProgramCounter[] getLineNumbers(CodeAttrInfo cai)
           
(package private)  String getMethodSignature(MethodInfo mi, boolean includeClassName)
           
(package private)  int getSourceLineNumber(LineNumberProgramCounter[] lnpc, int pc)
           
(package private)  void Log(String msg)
           
static void main(String[] args)
           
(package private)  void openOutputFile(String outputFileName)
          This method is used to open the specified fileName for output
(package private)  void processCode(ClassFile cf, CodeAttrInfo cai, Method method, MethodInfo mi)
           
(package private)  void processCommandLineArgs(String[] args)
           
 void processDirectory(String directoryName)
          This method is provided for the developer in case they want to do something each time they enter a new directory
(package private)  void processException(ClassFile cf, ExceptionAttrInfo eai)
           
 void processFile(String className)
          this method is provided for the developer in case they want to do something each time a file is encountered in a directory.
(package private)  void processGetField(ClassFile cf, CodeAttrInfo cai)
           
(package private)  void processInstantiations(ClassFile cf, CodeAttrInfo cai)
           
(package private)  void processLocalVariables(ClassFile cf, CodeAttrInfo cai)
           
(package private)  void processMethodCalls(ClassFile cf, CodeAttrInfo cai, Method currentMethod, MethodInfo mi)
          if displayLocalCalls is true, then only output calls to methods in this class otherwise only output calls to methods not in this class.
(package private)  void processPutField(ClassFile cf, CodeAttrInfo cai)
           
(package private)  void run(String[] args)
          this method is used to run this class in stand-alone-mode in order to process a single class file
(package private) static void usage()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

d_currentPackageName

String d_currentPackageName

d_currentClass

ClassInterface d_currentClass

d_startingDirectory

String d_startingDirectory

d_outputDirectory

String d_outputDirectory

d_pw

PrintWriter d_pw

d_CrLf

String d_CrLf

d_localVariables

Hashtable d_localVariables

d_methodCalls

Hashtable d_methodCalls

d_getFields

Hashtable d_getFields

d_putFields

Hashtable d_putFields

d_instantiations

Hashtable d_instantiations
Constructor Detail

IndexJavaSource

public IndexJavaSource()
Method Detail

directoryNameOk

public boolean directoryNameOk(String directoryName)
Description copied from interface: ProcessFileInterface
this method is provided so that the application can validate whether or not the specified directory is ok or not

Specified by:
directoryNameOk in interface ProcessFileInterface

processDirectory

public void processDirectory(String directoryName)
Description copied from interface: ProcessFileInterface
This method is provided for the developer in case they want to do something each time they enter a new directory

Specified by:
processDirectory in interface ProcessFileInterface

getMethodSignature

String getMethodSignature(MethodInfo mi,
                          boolean includeClassName)

Log

void Log(String msg)

getSourceLineNumber

int getSourceLineNumber(LineNumberProgramCounter[] lnpc,
                        int pc)

getLineNumberAttrInfo

LineNumberAttrInfo getLineNumberAttrInfo(AttrInfoList ail)

getLineNumbers

LineNumberProgramCounter[] getLineNumbers(CodeAttrInfo cai)

processGetField

void processGetField(ClassFile cf,
                     CodeAttrInfo cai)

processPutField

void processPutField(ClassFile cf,
                     CodeAttrInfo cai)

processLocalVariables

void processLocalVariables(ClassFile cf,
                           CodeAttrInfo cai)

processException

void processException(ClassFile cf,
                      ExceptionAttrInfo eai)

processInstantiations

void processInstantiations(ClassFile cf,
                           CodeAttrInfo cai)

processMethodCalls

void processMethodCalls(ClassFile cf,
                        CodeAttrInfo cai,
                        Method currentMethod,
                        MethodInfo mi)
if displayLocalCalls is true, then only output calls to methods in this class otherwise only output calls to methods not in this class.


processCode

void processCode(ClassFile cf,
                 CodeAttrInfo cai,
                 Method method,
                 MethodInfo mi)

displayMethods

void displayMethods(ClassFile cf)

displaySuperClass

void displaySuperClass(ClassFile cf)

displayInterfaces

void displayInterfaces(ClassFile cf)

fileTypeOk

public boolean fileTypeOk(String fileName)
Description copied from interface: ProcessFileInterface
This method is provided for the developer in case they do not want to process every single file in every directory. They can then use this method to filter out the files they do not want to process.

Specified by:
fileTypeOk in interface ProcessFileInterface

displayFields

void displayFields(ClassFile cf)
This method outputs the fields for the current class


openOutputFile

void openOutputFile(String outputFileName)
This method is used to open the specified fileName for output


closeOutputFile

void closeOutputFile()

processFile

public void processFile(String className)
Description copied from interface: ProcessFileInterface
this method is provided for the developer in case they want to do something each time a file is encountered in a directory.

Specified by:
processFile in interface ProcessFileInterface

directoryCheck

void directoryCheck(String dirName)

processCommandLineArgs

void processCommandLineArgs(String[] args)

usage

static void usage()
Deprecated.  


run

void run(String[] args)
this method is used to run this class in stand-alone-mode in order to process a single class file


main

public static void main(String[] args)