|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxjavadoc.XJavaDoc
This class represents the entry-point for xjavadoc classes. Come here to get classes and packages.
Nested Class Summary | |
(package private) class |
XJavaDoc.LogMessage
|
static class |
XJavaDoc.NoInnerClassesPredicate
|
Field Summary | |
private java.util.Map |
_abstractFileClasses
|
private java.util.Map |
_allSourceClasses
This map contains the same classes as _sourceSetSourceClasses, but it is also populated with additional classes that may be accessed that were not in the source sets. |
private java.util.Map |
_binaryClasses
|
private long |
_birthday
Remember when we're born. |
private java.lang.String |
_docEncoding
charset for generated file |
private java.lang.String |
_encoding
charset for source file |
private java.util.List |
_logMessages
info, error and warning messages related to parsing and class qualification |
private java.util.Map |
_packages
|
private static java.util.HashMap |
_primitiveClasses
|
private java.util.Map |
_properties
|
private java.util.Set |
_sourceSetClassNames
|
private java.util.Set |
_sourceSets
|
private java.util.Map |
_sourceSetSourceClasses
This map contains all the classes that were passed in the source sets, excluding all inner classes. |
private java.util.Collection |
_sourceSetSourceClassesWithInnerClasses
This map contains all the classes that were passed in the source sets, including all inner classes. |
private XTagFactory |
_tagFactory
|
private java.util.Map |
_unknownClasses
|
private boolean |
_useNodeParser
sticky parameter for useNodeParser. |
static java.lang.String |
IS_UNICODE
Indicates whether this XJavaDoc was built with or without unicode support |
static int |
NO_IMPORTED_PACKAGES
messgage level for reporting unqualified classes when there are no imported packages |
static int |
ONE_OR_MORE_IMPORTED_PACKAGES
messgage level for reporting unqualified classes when there are one or more imported packages |
private static java.util.List |
PRIMITIVES
|
Constructor Summary | |
XJavaDoc()
|
Method Summary | |
void |
addAbstractFile(java.lang.String qualifiedName,
AbstractFile file)
|
private void |
addInnerClassRecursive(XClass outer,
java.util.Collection c)
Recursively adds inner classes to a collection |
(package private) XPackage |
addPackageMaybe(java.lang.String packageName)
Describe the method |
private void |
addPrimitive(java.lang.String name,
java.lang.String type)
Describe the method |
(package private) void |
addSourceClass(SourceClass sourceClass)
Adds a source class to the cache. |
void |
addSourceSet(SourceSet sourceSet)
Adds a new set of java sources to be parsed. |
(package private) boolean |
classExists(java.lang.String qualifiedClassName)
|
java.lang.String |
dereferenceProperties(java.lang.String value)
|
private java.lang.Class |
getClass(java.lang.String qualifiedName)
Returns the Class with the given name, or null if unknown. |
java.lang.String |
getDocEncoding()
Getter for generated file charset. |
java.lang.String |
getEncoding()
Getter for source file charset. |
private java.util.Collection |
getOuterSourceClasses()
Returns all classes in the registered source sets |
(package private) static Primitive |
getPrimitive(java.lang.String name)
Gets the Primitive attribute of the XJavaDoc class |
java.util.Map |
getPropertyMap()
|
java.util.Collection |
getSourceClasses()
Returns all classes in the registered source sets, including inner classes |
java.util.Collection |
getSourceClasses(boolean useNodeParser)
Deprecated. Call setUseNodeParser() prior to parsing and call the no-arg getSourceClasses() |
java.util.Collection |
getSourceClasses(boolean useNodeParser,
boolean inner)
Deprecated. Call setUseNodeParser() prior to parsing and call the no-arg getSourceClasses() or getSourceClasses(Predicate) with a Predicate that doesn't accept inner classes. |
java.util.Collection |
getSourceClasses(org.apache.commons.collections.Predicate predicate)
|
private AbstractFile |
getSourceFile(java.lang.String qualifiedName)
Gets the SourceFile attribute of the XJavaDoc object |
(package private) static AbstractFile |
getSourceFileFor(XProgramElement pe)
Gets the file the pe is contained in. |
XPackage |
getSourcePackage(java.lang.String packageName)
Returns the package. |
java.util.Collection |
getSourcePackages()
Returns the packages of the specified classes during parsing. |
XTagFactory |
getTagFactory()
|
XClass |
getXClass(java.lang.String qualifiedName)
Get the XClass corresponding to the qualifiedName. |
(package private) void |
logMessage(SourceClass clazz,
UnknownClass unknownClass,
java.lang.String unqualifiedClassName,
int level)
|
static void |
parsePropertyString(java.lang.String value,
java.util.List fragments,
java.util.List propertyRefs)
Parses a string containing ${xxx} style property references
into two lists. |
void |
printLogMessages(java.io.PrintStream out,
int level)
Prints the log messages encountered during parsing |
static void |
printMemoryStatus()
Dump to sytem out the status of XJavadoc. |
void |
registerTags(java.lang.String classpath)
Registers tags. |
static java.lang.String |
replaceProperties(java.lang.String value,
java.util.Map keys)
Replaces ${xxx} style constructions in the given value with the
string value of the corresponding data types. |
void |
reset()
Deprecated. use reset(boolean). |
void |
reset(boolean resetTimeStamp)
Resets the caches. |
private SourceClass |
scanAndPut(java.lang.String qualifiedName)
Scan's a class and puts it in the cache. |
void |
setDocEncoding(java.lang.String docencoding)
Setter for generated file charset. |
void |
setEncoding(java.lang.String encoding)
Setter for source file charset. |
void |
setPropertyMap(java.util.Map properties)
|
void |
setUseNodeParser(boolean useNodeParser)
This method can be called prior to parsing so that all classes are parsed with AST (to make it possible to write the source back to disk) |
private boolean |
sourceExists(java.lang.String qualifiedName)
Checks is the source exists |
XClass |
updateClassTag(java.lang.String className,
java.lang.String tagName,
java.lang.String parameterName,
java.lang.String parameterValue,
int tagIndex)
Describe what the method does |
XClass |
updateMethodTag(java.lang.String className,
java.lang.String methodNameWithSignature,
java.lang.String tagName,
java.lang.String parameterName,
java.lang.String parameterValue,
int tagIndex)
Describe what the method does |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String IS_UNICODE
public static final int NO_IMPORTED_PACKAGES
public static final int ONE_OR_MORE_IMPORTED_PACKAGES
private static final java.util.List PRIMITIVES
private static java.util.HashMap _primitiveClasses
private final java.util.Map _binaryClasses
private final java.util.Map _unknownClasses
private final java.util.Map _packages
private final java.util.Set _sourceSets
private final java.util.Map _sourceSetSourceClasses
private final java.util.Map _allSourceClasses
private final java.util.Set _sourceSetClassNames
private final java.util.Map _properties
private final java.util.Map _abstractFileClasses
private final XTagFactory _tagFactory
private java.util.Collection _sourceSetSourceClassesWithInnerClasses
private long _birthday
private java.util.List _logMessages
private boolean _useNodeParser
private java.lang.String _encoding
private java.lang.String _docEncoding
Constructor Detail |
public XJavaDoc()
Method Detail |
public static void printMemoryStatus()
public static java.lang.String replaceProperties(java.lang.String value, java.util.Map keys)
${xxx}
style constructions in the given value with the
string value of the corresponding data types. NOTE: This method was taken
directly from Ant's source code (org.apache.tools.ant.ProjectHelper) and
modified slightly to use a Map instead of a HashMap.
value
- The string to be scanned for property references. May be
null
, in which case this method returns immediately with
no effect.keys
- Mapping (String to String) of property names to their values.
Must not be null
.
null
if the original string is null
.public static void parsePropertyString(java.lang.String value, java.util.List fragments, java.util.List propertyRefs)
${xxx}
style property references
into two lists. The first list is a collection of text fragments, while the
other is a set of string property names. null
entries in the
first list indicate a property reference from the second list. NOTE: This
method was taken directly from Ant's source code
(org.apache.tools.ant.ProjectHelper) with the BuildException throwing
removed.
value
- Text to parse. Must not be null
.fragments
- List to add text fragments to. Must not be null
.propertyRefs
- List to add property names to. Must not be null
static Primitive getPrimitive(java.lang.String name)
name
- Describe what the parameter does
static AbstractFile getSourceFileFor(XProgramElement pe)
pe
- the program element we want the source for.
private final void addPrimitive(java.lang.String name, java.lang.String type)
name
- Describe the method parametertype
- The feature to be added to the Primitive attributepublic java.util.Collection getSourceClasses(org.apache.commons.collections.Predicate predicate)
public java.util.Collection getSourceClasses(boolean useNodeParser, boolean inner)
useNodeParser
- inner
-
public java.util.Collection getSourceClasses(boolean useNodeParser)
useNodeParser
-
public java.util.Collection getSourceClasses()
public java.util.Collection getSourcePackages()
public java.util.Map getPropertyMap()
public XClass getXClass(java.lang.String qualifiedName)
qualifiedName
- Fully qualified class name
public XPackage getSourcePackage(java.lang.String packageName)
packageName
-
public void setUseNodeParser(boolean useNodeParser)
useNodeParser
- public void setPropertyMap(java.util.Map properties)
public void reset()
reset(true)
.
public void reset(boolean resetTimeStamp)
resetTimeStamp
- true if timestamps should be reset too.public void printLogMessages(java.io.PrintStream out, int level)
out
- level
- public void addSourceSet(SourceSet sourceSet)
sourceSet
- a set of java sources.public void addAbstractFile(java.lang.String qualifiedName, AbstractFile file)
public XClass updateMethodTag(java.lang.String className, java.lang.String methodNameWithSignature, java.lang.String tagName, java.lang.String parameterName, java.lang.String parameterValue, int tagIndex) throws XJavaDocException
className
- qualified name of classtagName
- tag nameparameterName
- parameter nameparameterValue
- new parameter valuetagIndex
- index of tag (??)methodNameWithSignature
- method name followed by signature. no
spaces. Ex:doIt(java.lang.String,int)
XJavaDocException
- If the tag for some reason couldn't be
updatedpublic XClass updateClassTag(java.lang.String className, java.lang.String tagName, java.lang.String parameterName, java.lang.String parameterValue, int tagIndex) throws XJavaDocException
className
- Describe what the parameter doestagName
- Describe what the parameter doesparameterName
- Describe what the parameter doesparameterValue
- Describe what the parameter doestagIndex
- Describe what the parameter does
XJavaDocException
- Describe the exceptionpublic java.lang.String dereferenceProperties(java.lang.String value)
final boolean classExists(java.lang.String qualifiedClassName)
qualifiedClassName
-
void logMessage(SourceClass clazz, UnknownClass unknownClass, java.lang.String unqualifiedClassName, int level)
XPackage addPackageMaybe(java.lang.String packageName)
packageName
- Describe the method parameter
void addSourceClass(SourceClass sourceClass)
sourceClass
- Describe the method parameterprivate final java.lang.Class getClass(java.lang.String qualifiedName)
qualifiedName
- Describe what the parameter does
private java.util.Collection getOuterSourceClasses()
private AbstractFile getSourceFile(java.lang.String qualifiedName)
qualifiedName
- Describe what the parameter does
private void addInnerClassRecursive(XClass outer, java.util.Collection c)
outer
- The feature to be added to the InnerClassRecursive attributec
- The feature to be added to the InnerClassRecursive attributeprivate boolean sourceExists(java.lang.String qualifiedName)
qualifiedName
- the class to check for
private SourceClass scanAndPut(java.lang.String qualifiedName)
qualifiedName
- Describe what the parameter does
public XTagFactory getTagFactory()
public void registerTags(java.lang.String classpath)
classpath
- where tags are found.public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
public java.lang.String getDocEncoding()
public void setDocEncoding(java.lang.String docencoding)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |