|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.introspection.XmlIiGenerator
XmlIiGenerator is a tool which is used for producing "InfoReports"
describing the structure of modeled Windchill classes in XML format.
Supported API: false
Extendable: false
WTIntrospector
,
ClassInfo
,
LinkInfo
,
AttributeDescriptor
Field Summary | |
protected File |
directory
|
protected static Class |
ENUMERATED_TYPE
|
protected boolean |
ignoreProblems
|
protected static MappedRegistry |
modelRegistry
|
protected File |
outputDirectory
|
protected boolean |
printReport
|
protected String |
suffix
|
protected static Class |
WINDCHILL_CLASS
|
Constructor Summary | |
protected |
XmlIiGenerator()
For use by subtypes. |
protected |
XmlIiGenerator(XmlIiGenerator parent)
For use by subtypes. |
Method Summary | |
private static XmlIiGenerator[] |
createTestsFor(String target)
|
private static Class |
dynamicallyLoadClassForStaticInitializer(String class_name)
For use by the static initializer to dynamically load the specified class. |
protected File |
getOutputDirectory()
The directory into which reports should be written. |
static boolean |
isIntrospectable(Class the_class)
A class is introspectable if it is an interface or extends wt.fc.NetFactor or wt.fc.EnumeratedType. |
static void |
main(String[] args)
Parameters: |
protected static Document |
newDocument()
|
protected void |
print(Enumeration collection)
Print the values of a Enumerations. |
protected void |
print(Object[] array)
Print the values of a Array to the report |
abstract void |
process()
Must be implemented by a subclass to do the actual work. |
private static void |
process(XmlIiGenerator[] tests,
boolean print_report,
String suffix,
File directory)
|
protected void |
report(String line)
Write the specified line to the output file if outputing a report file. |
void |
setDirectory(File directory)
The root directory from which introspection information files should be loaded. |
void |
setIgnoreProblems(boolean ignore_problems)
Specify whether problems should result in thrown exceptions (and termination) or not. |
void |
setOutputDirectory(File output_directory)
|
void |
setPrintReport(boolean printReport)
Indicate whether to produce the report or not. |
void |
setSuffix(String suffix)
Specify an optional suffix to add to report file names. |
private static boolean |
stringSpecifiesRegistry(String class_names)
Determines if the string equals 'registry' or '*' |
static String |
tail(String aString,
char aSeparator,
int level)
tail - pull off the trailing token following the supplied separator |
protected static void |
writeDocument(Document document,
File file)
Write the DOM document to the specified File creating the containing directories as needed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static MappedRegistry modelRegistry
protected static Class WINDCHILL_CLASS
protected static Class ENUMERATED_TYPE
protected boolean printReport
protected String suffix
protected File directory
protected File outputDirectory
protected boolean ignoreProblems
Constructor Detail |
protected XmlIiGenerator()
protected XmlIiGenerator(XmlIiGenerator parent)
Method Detail |
public static final boolean isIntrospectable(Class the_class)
private static Class dynamicallyLoadClassForStaticInitializer(String class_name) throws ExceptionInInitializerError
ExceptionInInitializerError
- if the class cannot be loadedpublic final void setIgnoreProblems(boolean ignore_problems)
public final void setDirectory(File directory)
public final void setSuffix(String suffix)
public final void setPrintReport(boolean printReport)
protected final File getOutputDirectory()
public final void setOutputDirectory(File output_directory)
public abstract void process() throws WTIntrospectionException
WTIntrospectionException
public static void main(String[] args)
args[0] (required) - What run introspection on acceptable: pattern: registry | com.acme.foo.* | comma-delimited-list-of-class-names args[1] (optional) - whether or not to output report acceptable: true | false args[2] (optional) - additional suffix to the report file name acceptable: whatever caller wants args[3] (optional) - directory to load introspection data relative to acceptable: a valid path
private static XmlIiGenerator[] createTestsFor(String target)
private static void process(XmlIiGenerator[] tests, boolean print_report, String suffix, File directory) throws WTIntrospectionException
WTIntrospectionException
protected static Document newDocument()
protected static void writeDocument(Document document, File file) throws IOException, SAXException
IOException
SAXException
private static boolean stringSpecifiesRegistry(String class_names)
protected final void print(Object[] array)
array
- the collection of values to print (the values will be rendered via toString())protected final void print(Enumeration collection)
collection
- the collection of object values to print (the values will be rendered via toString())protected final void report(String line)
line
- the line to writepublic static String tail(String aString, char aSeparator, int level)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |