|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xjavadoc.AbstractProgramElement | +--xjavadoc.AbstractClass | +--xjavadoc.SourceClass
This class represents a class for which the source code is available XJavaDocFil
Field Summary | |
static int |
instanceCount
|
Constructor Summary | |
SourceClass(SourceClass containingClass)
Constructor to use for inner classes. |
|
SourceClass(SourceClass mainClass,
int dummy)
Constructor to use for "extra" classes, that is, secondary classes that figure in the same source. |
|
SourceClass(XJavaDoc xJavaDoc,
AbstractFile sourceFile,
boolean useNodeParser)
Constructor to use for outer classes |
|
SourceClass(XJavaDoc xJavaDoc,
File sourceFile)
Constructor to use for outer classes |
|
SourceClass(XJavaDoc xJavaDoc,
File sourceFile,
boolean useNodeParser)
|
Method Summary | |
void |
addTagForValidation(DefaultXTag tag)
|
SimpleNode |
getCompilationUnit()
|
AbstractFile |
getFile()
|
static String |
getFileName(String qualifiedName)
Describe what the method does |
String |
getNextAnonymousClassName()
Returns "1", "2", etc., depending on how many inner classes we have. |
Reader |
getReader()
Returns a reader for the source code. |
boolean |
isExtraClass()
|
boolean |
isPrimitive()
Returns true if this class is a primitive. |
boolean |
isWriteable()
Gets the Writeable attribute of the SourceClass object |
long |
lastModified()
Describe what the method does |
void |
print(OutputStream out)
Deprecated. use the Writer method |
void |
print(Writer out)
Prints this class to a stream |
XClass |
qualify(String unqualifiedClassName)
Returns fully qualified name of a class. |
void |
reset()
|
String |
save(File rootDir)
Saves the class at root dir rootDir. |
boolean |
saveNeeded()
whether class needs saving |
void |
setCompilationUnit(SimpleNode compilationUnit)
Called by JavaParser at the end of the parsing |
void |
setDirty()
say this class is dirty and needs saving propagate to outer class ( if any ) |
void |
validateTags()
Called by XJavaDoc after the entire source is parsed, but only if validation is on. |
Methods inherited from class xjavadoc.AbstractProgramElement |
addModifier, getContainingAbstractClass, getContainingClass, getDoc, getModifiers, getModifierSpecifier, getXJavaDoc, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, setToken |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface xjavadoc.XClass |
isAbstract |
Methods inherited from interface xjavadoc.XProgramElement |
getContainingClass, getDoc, getModifiers, getModifierSpecifier, getXJavaDoc, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic |
Field Detail |
public static int instanceCount
Constructor Detail |
public SourceClass(SourceClass containingClass)
containingClass
- The containing class;public SourceClass(SourceClass mainClass, int dummy)
mainClass
- The containing class. Or rather the "main" class in the
source.dummy
- public SourceClass(XJavaDoc xJavaDoc, File sourceFile)
sourceFile
- The file containing the sourcepublic SourceClass(XJavaDoc xJavaDoc, File sourceFile, boolean useNodeParser)
sourceFile
- useNodeParser
- public SourceClass(XJavaDoc xJavaDoc, AbstractFile sourceFile, boolean useNodeParser)
sourceFile
- The file containing the sourceuseNodeParser
- Method Detail |
public static String getFileName(String qualifiedName)
qualifiedName
- Describe what the parameter does
public boolean isExtraClass()
public String getNextAnonymousClassName()
public boolean isWriteable()
public SimpleNode getCompilationUnit()
public Reader getReader()
public AbstractFile getFile()
public boolean isPrimitive()
XClass
public void setDirty()
public void setCompilationUnit(SimpleNode compilationUnit)
compilationUnit
- The new CompilationUnit valuepublic void validateTags() throws TagValidationException
TagValidationException
public void addTagForValidation(DefaultXTag tag)
public boolean saveNeeded()
XClass
public long lastModified()
lastModified
in interface XClass
lastModified
in class AbstractClass
public void print(OutputStream out)
out
- public void print(Writer out)
out
- Describe what the parameter doespublic String save(File rootDir) throws IOException
save
in interface XClass
save
in class AbstractClass
rootDir
- the root directory.
IOException
- if the file couldn't be savedpublic XClass qualify(String unqualifiedClassName)
qualify
in interface XClass
qualify
in class AbstractClass
unqualifiedClassName
- Describe what the parameter does
public void reset()
reset
in class AbstractClass
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |