|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.tools.xref.Util
This class contains a number of convenience methods used by other classes in this package.
Field Summary | |
(package private) static FileInputStream |
d_fis
This file handle is used by the openClassFile() and closeClassFile() methods. |
Constructor Summary | |
Util()
|
Method Summary | |
(package private) static String |
arrayBrackets(int count)
This method is used to create a string the specified number of square bracket pairs. |
static void |
classFileSummary(String dotStyleClassSpec)
This method outputs a simple summary of: 1) methods defined in the class 2) fields referenced in other classes 3) methods called in other classes 4) other classes that this class is dependent on |
static String |
cleanClassSpec(String classSpec)
This method watches for classSpec's like: [Ljava.lang.Object [B and converts them to a more meaningful form. |
static String |
cleanUpHrefString(String s)
This method replaces problematic characters in strings that don't get displayed correctly within the browser WITH the appropriate HTML alternative. |
(package private) static void |
closeClassFile()
This method must be called after you are done processing a class file previously opened with a call to openClassFile() |
static void |
displayClassDependencies(String directoryContainingClass,
String className)
This method displays the list of dependencies for the specified class. |
(package private) static void |
displayStringArray(PrintWriter pw,
String title,
String[] array,
boolean sortArray,
int indentAmount)
This method outputs the contents of an array of String's. |
(package private) static void |
displayStringArray(String title,
String[] array,
boolean sortArray,
int indentAmount)
This method outputs the contents of an array of String's. |
(package private) static void |
dumpAttributeList(ClassFile cf)
|
(package private) static void |
dumpAttributeList(String title,
String prefix,
AttrInfoList ail)
|
(package private) static void |
dumpConstantPool(ClassFile cf)
|
static String[] |
enumerationOfStringsToSortedArray(Enumeration e,
int enumSize)
This method creates an array of String's out of the specified Enumeration and then sorts the array. |
(package private) static void |
Log(String msg)
|
(package private) static void |
LogError(String msg)
|
(package private) static void |
LogError(Throwable t,
String msg)
This method provides a convenient way of logging an exception that occurs including both the message text for the original throw and the full stack trace. |
(package private) static ClassFile |
openClassFile(String fileName)
This convenience method opens the specified .class file. |
(package private) static String |
replaceChar(String theString,
char ch,
String replacementString)
|
static String[] |
splitClass(String s)
This method takes a string like: wt.query.QuerySpec and returns: returnArray[0] = wt.query returnArray[1] = QuerySpec |
static String[] |
splitClassMember(String s)
This method takes a string like: wt.query.QuerySpec.someFunc() and returns: returnArray[0] = wt.query returnArray[1] = QuerySpec returnArray[2] = someFunc() |
static String[] |
splitFullPathFileName(String fileName)
This method takes a full path filename like: Z:\Windchill\codebase\wt\query\QuerySpec.class and splits it into two pieces: returnArray[0] = Z:\Windchill\codebase\wt\query returnArray[1] = QuerySpec.class |
static String |
stringArrayToString(String[] array)
|
static String |
toFullPathClassName(String dotStyleClassSpec)
This method converts a dot-style class specification into a full-path .class filename. |
(package private) static String[] |
vectorOfStringsToSortedArray(Vector v)
This method creates an array of String's out of the specified Vector and then sorts the array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static FileInputStream d_fis
Constructor Detail |
public Util()
Method Detail |
static void LogError(String msg)
static void LogError(Throwable t, String msg)
static ClassFile openClassFile(String fileName) throws Exception
This convenience method opens the specified .class file.
SPECIAL NOTE: when you are done processing a class file you've opened with this method, you must call closeclassfile(), otherwise you could overflow the file handle table if you are processing very many class files.
Exception
static void closeClassFile()
static void displayStringArray(String title, String[] array, boolean sortArray, int indentAmount)
This method outputs the contents of an array of String's. The output is preceded with the specified title and the array can be sorted if specified by the caller.
The difference between this method and the other displayStringArray() method is that this method does not require that you pass an instantiated PrintWriter.
static void displayStringArray(PrintWriter pw, String title, String[] array, boolean sortArray, int indentAmount)
This method outputs the contents of an array of String's. The output is preceded with the specified title and the array can be sorted if specified by the caller.
The difference between this method and the other displayStringArray() method is that this method requires that you pass an instantiated PrintWriter.
public static String toFullPathClassName(String dotStyleClassSpec)
This method converts a dot-style class specification into a full-path .class filename.
This method takes a dot-style class specification like: wt.query.QuerySpec and converts it to the form: Z:\Windchill\codebase\wt\query\QuerySpec.class
public static String[] splitFullPathFileName(String fileName)
This method takes a full path filename like: Z:\Windchill\codebase\wt\query\QuerySpec.class and splits it into two pieces: returnArray[0] = Z:\Windchill\codebase\wt\query returnArray[1] = QuerySpec.class
public static void classFileSummary(String dotStyleClassSpec)
This method outputs a simple summary of: 1) methods defined in the class 2) fields referenced in other classes 3) methods called in other classes 4) other classes that this class is dependent on
public static void displayClassDependencies(String directoryContainingClass, String className)
This method displays the list of dependencies for the specified class. directoryContainingClass: "Z:\\windchill\\codebase\\wt\\query\\" className: "QuerySpec.class"
public static String[] splitClass(String s)
This method takes a string like: wt.query.QuerySpec and returns: returnArray[0] = wt.query returnArray[1] = QuerySpec
public static String[] splitClassMember(String s)
This method takes a string like: wt.query.QuerySpec.someFunc() and returns: returnArray[0] = wt.query returnArray[1] = QuerySpec returnArray[2] = someFunc()
static void dumpAttributeList(String title, String prefix, AttrInfoList ail)
static void dumpAttributeList(ClassFile cf)
static void dumpConstantPool(ClassFile cf)
static void Log(String msg)
static String[] vectorOfStringsToSortedArray(Vector v)
public static String[] enumerationOfStringsToSortedArray(Enumeration e, int enumSize)
public static String cleanClassSpec(String classSpec)
static String arrayBrackets(int count)
static String replaceChar(String theString, char ch, String replacementString)
public static String cleanUpHrefString(String s)
public static String stringArrayToString(String[] array)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |