xdoclet.tags
Class ClassTagsHandler

java.lang.Object
  |
  +--xdoclet.template.TemplateTagHandler
        |
        +--xdoclet.XDocletTagSupport
              |
              +--xdoclet.tags.AbstractProgramElementTagsHandler
                    |
                    +--xdoclet.tags.ClassTagsHandler
Direct Known Subclasses:
JBossTagsHandler, MVCSoftTagsHandler

public class ClassTagsHandler
extends AbstractProgramElementTagsHandler

Version:
$Revision: 1.23 $
Author:
Ara Abrahamian (ara_e@email.com)

Field Summary
protected static java.text.DateFormat dateFormatter
          Used for setting the timestamp for xdoclet-generated marker in generated files.
 
Fields inherited from class xdoclet.tags.AbstractProgramElementTagsHandler
currentToken, matchPattern, tagTokenizer
 
Fields inherited from class xdoclet.XDocletTagSupport
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER
 
Constructor Summary
ClassTagsHandler()
           
 
Method Summary
 java.lang.String classComment(java.util.Properties attributes)
          The comment for the current class.
 java.lang.String classCommentTags(java.util.Properties attributes)
          The javadoc comment tags for the current class (plus xdoclet-generated).
 java.lang.String classCommentText(java.util.Properties attributes)
          The text of the javadoc comment for the current class.
 java.lang.String className()
          Returns the not-full-qualified name of the current class without the package name.
 void classOf(java.lang.String template)
          Returns the not-full-qualified name of the full-qualified class name specified in the body of this tag.
 java.lang.String classTagValue(java.util.Properties attributes)
          Iterates over all class tags with the specified tagName and evaluates the body of the tag for each class tag.
 java.lang.String classTagValueMatch(java.util.Properties attributes)
          Sets the value of match variable.
 java.lang.String firstSentenceDescription(java.util.Properties attributes)
          Return standard javadoc of current class.
 void forAllClasses(java.lang.String template, java.util.Properties attributes)
          Iterates over all classes loaded by javadoc and evaluates the body of the tag for each class.
 void forAllClassTags(java.lang.String template, java.util.Properties attributes)
          Iterates over all tags of current class with the name tagName and evaluates the body of the tag for each method.
 void forAllClassTagTokens(java.lang.String template, java.util.Properties attributes)
          Iterates over all tokens in specified class tag with the name tagName and evaluates the body for every token.
 java.lang.String fullClassName()
          Returns the full-qualified name of the superclass of the current class.
 java.lang.String fullSuperclassName()
          Returns the full-qualified name of the superclass of the current class.
static java.lang.String getClassNameFor(com.sun.javadoc.ClassDoc clazz)
          Returns the not-full-qualified name of the current class without the package name.
static java.lang.String getFullClassNameFor(com.sun.javadoc.ClassDoc clazz)
          Returns the full-qualified name of the current class with the package name.
 void ifClassTagValueEquals(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if value for the class tag equals the specified value.
 void ifClassTagValueMatches(java.lang.String template, java.util.Properties attributes)
          Evaluate the body if the match variable equals with the value of the specified tag/parameter.
 void ifClassTagValueNotEquals(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if value for the class tag not equals the specified value.
 void ifDoesntHaveClassTag(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if current class doesn't have at least one tag with the specified name.
 void ifHasClassTag(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if current class has at least one tag with the specified name.
 void ifIsClassAbstract(java.lang.String template)
          Evaluate the body block if current class is abstract.
 void ifIsClassNotAbstract(java.lang.String template)
          Evaluate the body block if current class is not abstract.
 java.lang.String importedList(java.util.Properties attributes)
          Iterates over all imported classes and packages imported in the current class and returns the list.
 void pushClass(java.lang.String template, java.util.Properties attributes)
          Pushes the class specified by value parameter to top of stack making it the current class.
 java.lang.String symbolicClassName()
          Returns the symbolic name of the current class.
 
Methods inherited from class xdoclet.tags.AbstractProgramElementTagsHandler
checkForWrap, currentToken, exceptionList, forAllMembers, forAllMemberTags, forAllMemberTagTokens, getAllClasses, getExecutableMemberDocForMemberName, getExecutableMemberDocForMemberName, getFullSuperclassNameFor, getIndentChars, hasExecutableMember, ifHasTag_Impl, ifTagValueEquals_Impl, matchValue, memberComment, setMatchValue, skipToken
 
Methods inherited from class xdoclet.XDocletTagSupport
getClassTagValue, getClassTagValue, getConstructorTagValue, getCurrentClass, getCurrentConstructor, getCurrentField, getCurrentMethod, getCurrentPackage, getCurrentTag, getDocletContext, getFieldTagValue, getFieldTagValue, getMethodTagValue, getMethodTagValue, getParameterValue, getParameterValue, getTagValue, getTagValue, getTagValue, invalidParamValueFound, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, parsePropertyString, popCurrentClass, pushCurrentClass, replaceProperties, setCurrentClass, setCurrentConstructor, setCurrentField, setCurrentMethod, setCurrentPackage, setCurrentTag, tokenizeValue
 
Methods inherited from class xdoclet.template.TemplateTagHandler
generate, getContext, getEngine, getParser, setContext, setEngine, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateFormatter

protected static final java.text.DateFormat dateFormatter
Used for setting the timestamp for xdoclet-generated marker in generated files.
Constructor Detail

ClassTagsHandler

public ClassTagsHandler()
Method Detail

getClassNameFor

public static java.lang.String getClassNameFor(com.sun.javadoc.ClassDoc clazz)
Returns the not-full-qualified name of the current class without the package name.
Parameters:
clazz - Description of Parameter
Returns:
Description of the Returned Value

getFullClassNameFor

public static java.lang.String getFullClassNameFor(com.sun.javadoc.ClassDoc clazz)
Returns the full-qualified name of the current class with the package name.
Parameters:
clazz - Description of Parameter
Returns:
Description of the Returned Value

className

public java.lang.String className()
                           throws XDocletException
Returns the not-full-qualified name of the current class without the package name.
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

fullClassName

public java.lang.String fullClassName()
                               throws XDocletException
Returns the full-qualified name of the superclass of the current class.
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

fullSuperclassName

public java.lang.String fullSuperclassName()
                                    throws XDocletException
Returns the full-qualified name of the superclass of the current class.
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

classOf

public void classOf(java.lang.String template)
             throws XDocletException
Returns the not-full-qualified name of the full-qualified class name specified in the body of this tag.
Parameters:
template - The body of the block tag
Throws:
XDocletException - Description of Exception

ifIsClassAbstract

public void ifIsClassAbstract(java.lang.String template)
                       throws XDocletException
Evaluate the body block if current class is abstract.
Parameters:
template - The body of the block tag
Throws:
XDocletException - Description of Exception
See Also:
ifIsClassNotAbstract(java.lang.String)

ifIsClassNotAbstract

public void ifIsClassNotAbstract(java.lang.String template)
                          throws XDocletException
Evaluate the body block if current class is not abstract.
Parameters:
template - The body of the block tag
Throws:
XDocletException - Description of Exception
See Also:
ifIsClassAbstract(java.lang.String)

pushClass

public void pushClass(java.lang.String template,
                      java.util.Properties attributes)
               throws XDocletException
Pushes the class specified by value parameter to top of stack making it the current class.
Parameters:
attributes - The attributes of the template tag
template - The body of the block tag
Throws:
XDocletException - Description of Exception

forAllClasses

public void forAllClasses(java.lang.String template,
                          java.util.Properties attributes)
                   throws XDocletException
Iterates over all classes loaded by javadoc and evaluates the body of the tag for each class. It descards classes that have a xdoclet-generated class tag defined.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

symbolicClassName

public java.lang.String symbolicClassName()
                                   throws XDocletException
Returns the symbolic name of the current class. For a java bean it's the same as the class name.
Returns:
The symbolic name of the current class
Throws:
XDocletException - Description of Exception

ifDoesntHaveClassTag

public void ifDoesntHaveClassTag(java.lang.String template,
                                 java.util.Properties attributes)
                          throws XDocletException
Evaluates the body if current class doesn't have at least one tag with the specified name.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

ifHasClassTag

public void ifHasClassTag(java.lang.String template,
                          java.util.Properties attributes)
                   throws XDocletException
Evaluates the body if current class has at least one tag with the specified name.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

ifClassTagValueMatches

public void ifClassTagValueMatches(java.lang.String template,
                                   java.util.Properties attributes)
                            throws XDocletException
Evaluate the body if the match variable equals with the value of the specified tag/parameter.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

ifClassTagValueEquals

public void ifClassTagValueEquals(java.lang.String template,
                                  java.util.Properties attributes)
                           throws XDocletException
Evaluates the body if value for the class tag equals the specified value.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

ifClassTagValueNotEquals

public void ifClassTagValueNotEquals(java.lang.String template,
                                     java.util.Properties attributes)
                              throws XDocletException
Evaluates the body if value for the class tag not equals the specified value.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

classTagValue

public java.lang.String classTagValue(java.util.Properties attributes)
                               throws XDocletException
Iterates over all class tags with the specified tagName and evaluates the body of the tag for each class tag.
Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

classTagValueMatch

public java.lang.String classTagValueMatch(java.util.Properties attributes)
                                    throws XDocletException
Sets the value of match variable. Match variable serves as a variable for templates, you set it somewhere in template and look it up somewhere else in temaplte. This tag does not return any content, it just sets the match variable.
Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

forAllClassTags

public void forAllClassTags(java.lang.String template,
                            java.util.Properties attributes)
                     throws XDocletException
Iterates over all tags of current class with the name tagName and evaluates the body of the tag for each method.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

forAllClassTagTokens

public void forAllClassTagTokens(java.lang.String template,
                                 java.util.Properties attributes)
                          throws XDocletException
Iterates over all tokens in specified class tag with the name tagName and evaluates the body for every token.
Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception

classComment

public java.lang.String classComment(java.util.Properties attributes)
                              throws XDocletException
The comment for the current class.
Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
See Also:
MethodTagsHandler.methodComment(java.util.Properties), classCommentText(java.util.Properties), classCommentTags(java.util.Properties)

classCommentText

public java.lang.String classCommentText(java.util.Properties attributes)
                                  throws XDocletException
The text of the javadoc comment for the current class.
Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
See Also:
MethodTagsHandler.methodComment(java.util.Properties), classComment(java.util.Properties)

classCommentTags

public java.lang.String classCommentTags(java.util.Properties attributes)
                                  throws XDocletException
The javadoc comment tags for the current class (plus xdoclet-generated).
Parameters:
attributes - The attributes of the template tag
Returns:
The class-level tags
Throws:
XDocletException - Description of Exception
See Also:
MethodTagsHandler.methodComment(java.util.Properties), classComment(java.util.Properties)

firstSentenceDescription

public java.lang.String firstSentenceDescription(java.util.Properties attributes)
                                          throws XDocletException
Return standard javadoc of current class.
Parameters:
attributes -  
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception

importedList

public java.lang.String importedList(java.util.Properties attributes)
                              throws XDocletException
Iterates over all imported classes and packages imported in the current class and returns the list. The composed string has 'import ' in front of each import statement, and each import is in a separate line.
Parameters:
attributes -  
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception