Tags relating to classes being processed and class-level attributes.
classComment
public String classComment(Properties attributes)
throws XDocletException
The comment for the current class.
attributes
- The attributes of the template tag
MethodTagsHandler.methodComment(java.util.Properties)
, classCommentText(java.util.Properties)
, classCommentTags(java.util.Properties)
- name = "no-comment-signs"
optional = "true"
values = "true,false"
description = "If true
then don't decorate the comment with comment signs. Default is false."
classCommentTags
public String classCommentTags(Properties attributes)
throws XDocletException
The javadoc comment tags for the current class (plus xdoclet-generated).
attributes
- The attributes of the template tag
MethodTagsHandler.methodComment(java.util.Properties)
, classComment(java.util.Properties)
classCommentText
public String classCommentText(Properties attributes)
throws XDocletException
The text of the javadoc comment for the current class.
attributes
- The attributes of the template tag
MethodTagsHandler.methodComment(java.util.Properties)
, classComment(java.util.Properties)
- name = "no-comment-signs"
optional = "true"
values = "true,false"
description = "If true
then don't decorate the comment with comment signs. Default is false."
- handle inline link tags in comment text
className
public String className()
throws XDocletException
Returns the not-fully-qualified name of the current class without the package name.
- the name of the current class
classOf
public void classOf(String template)
throws XDocletException
Returns the not-full-qualified name of the full-qualified class name specified in the body of this tag.
template
- The body of the block tag
classTagValue
public String classTagValue(Properties attributes)
throws XDocletException
Iterates over all class tags with the specified tagName and evaluates the body of the tag for each class tag.
attributes
- The attributes of the template tag
- Description of the Returned Value
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "paramName"
description = "The parameter name. If not specified, then the raw
content of the tag is returned."
- name = "paramNum"
description = "The zero-based parameter number. It's used if the user
used the space-separated format for specifying parameters."
- name = "values"
description = "The valid values for the parameter, comma separated. An
error message is printed if the parameter value is not one of the values."
- name = "default"
description = "The default value is returned if parameter not specified
by user for the tag."
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
classTagValueMatch
public String classTagValueMatch(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.
attributes
- The attributes of the template tag
- Description of the Returned Value
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "paramName"
description = "The parameter name. If not specified, then the raw
content of the tag is returned."
- name = "paramNum"
description = "The zero-based parameter number. It's used if the user
used the space-separated format for specifying parameters."
firstSentenceDescription
public String firstSentenceDescription(Properties attributes)
throws XDocletException
Return first sentence of standard javadoc of current class.
attributes
- The attributes of the template tag
- class comment's first sentence
- name = "no-description-if-lacking"
optional = "true"
description = "Returns 'No
Description' if comment is lacking."
forAllClassTagTokens
public void forAllClassTagTokens(String template,
Properties attributes)
throws XDocletException
Iterates over all tokens in specified class tag with the name tagName and evaluates the body for every token.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The name of the tag to look in."
- name = "paramName"
optional = "false"
description = "The parameter of the tag whose value
is to be tokenized."
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
- name = "delimiter"
description = "delimiter for the StringTokenizer. consult javadoc for
java.util.StringTokenizer default is ','"
- name = "skip"
description = "how many tokens to skip on start"
forAllClassTags
public void forAllClassTags(String template,
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.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
- name = "tagKey"
description = "A tag property that will be used as a unique key. This is
used to avoid duplicate code due to similar tags in superclasses."
forAllClasses
public void forAllClasses(String template,
Properties attributes)
throws XDocletException
Iterates over all classes loaded by xjavadoc and evaluates the body of the tag for each class. It discards
classes that have a xdoclet-generated class tag defined.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "abstract"
optional = "true"
values = "true,false"
description = "If true then accept
abstract classes also; otherwise don't."
- name = "type"
optional = "true"
description = "For all classes by the type."
- name = "extent"
optional = "true"
values = "concrete-type,superclass,hierarchy"
description = "Specifies the extent of the type search. If concrete-type then only check the concrete type, if
superclass then check also superclass, if hierarchy then search the whole hierarchy and find if the class is
of the specified type. Default is hierarchy."
forAllDistinctClassTags
public void forAllDistinctClassTags(String template,
Properties attributes)
throws XDocletException
Iterates over all tags named according to tagName in a non-duplicated manner. The paramName parameter specifies
the tag parameter that should be unique during the iteration. Duplicated tags will generate a warning message.
Please note that this tag already processes all classes. There is no need to wrap it inside a
<XDtClass:forAllClasses> tag or any other tag that processes a group of classes.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The tag to iterate."
- name = "tagKey"
optional = "false"
description = "The tag parameter that should be used as
identifier."
forAllDistinctClassTags
public static void forAllDistinctClassTags(TemplateEngine engine,
String template,
String tagName,
String paramName)
throws XDocletException
Iterates over all tags named according to tagName in a non-duplicated manner. The paramName parameter should be
the tag parameter that should be unique during the iteration. Duplicated tags will generate a warning message.
Please note that this tag already processes all classes. There is no need to wrap it inside a
<XDtClass:forAllClasses> tag or any other tag that processes a group of classes.
engine
- template
- The body of the block tagtagName
- The tag to iterateparamName
- The tag parameter that should be used as identifier.
fullClassName
public String fullClassName()
throws XDocletException
Returns the full-qualified name of the current class.
- the name of the current class
fullSuperclassName
public String fullSuperclassName()
throws XDocletException
Returns the full-qualified name of the superclass of the current class.
- the name of the superclass of the current class
fullTransformedClassName
public String fullTransformedClassName()
throws XDocletException
Returns the fully-qualified transformed name of the current class with package name.
- the name of the current class
getClassNameFor
public static String getClassNameFor(XClass clazz)
use XClass.name()
Returns the not-full-qualified name of the specified class without the package name.
- getClassNameFor in interface AbstractProgramElementTagsHandler
clazz
- Description of Parameter
- Description of the Returned Value
- duplicate in AbstractProgramElementTagsHandler
getFullClassNameFor
public static String getFullClassNameFor(XClass clazz)
use XClass.qualifiedName()
Returns the full-qualified name of the specified class with the package name.
- getFullClassNameFor in interface AbstractProgramElementTagsHandler
clazz
- Description of Parameter
- Description of the Returned Value
ifClassTagValueEquals
public void ifClassTagValueEquals(String template,
Properties attributes)
throws XDocletException
Evaluates the body if value for the class tag equals the specified value.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "paramName"
description = "The parameter name. If not specified, then the raw
content of the tag is returned."
- name = "paramNum"
description = "The zero-based parameter number. It's used if the user
used the space-separated format for specifying parameters."
- name = "value"
optional = "false"
description = "The desired value."
ifClassTagValueMatches
public void ifClassTagValueMatches(String template,
Properties attributes)
throws XDocletException
Evaluate the body if the match variable equals with the value of the specified tag/parameter.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "values"
description = "The valid values for the parameter, comma separated. An
error message is printed if the parameter value is not one of the values."
- name = "default"
description = "The default value is returned if parameter not specified
by user for the tag."
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
- (Aslak) It appears that this method does the same job as ifClassTagValueEquals. It
also appears that no templates are using it. Candidate for removal?
ifClassTagValueNotEquals
public void ifClassTagValueNotEquals(String template,
Properties attributes)
throws XDocletException
Evaluates the body if value for the class tag not equals the specified value.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "paramName"
description = "The parameter name. If not specified, then the raw
content of the tag is returned."
- name = "paramNum"
description = "The zero-based parameter number. It's used if the user
used the space-separated format for specifying parameters."
- name = "value"
optional = "false"
description = "The desired value."
ifDoesntHaveClassTag
public void ifDoesntHaveClassTag(String template,
Properties attributes)
throws XDocletException
Evaluates the body if current class doesn't have at least one tag with the specified name.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "paramName"
description = "The parameter name. If not specified, then the raw
content of the tag is returned."
- name = "paramNum"
description = "The zero-based parameter number. It's used if the user
used the space-separated format for specifying parameters."
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
- name = "error"
description = "Show this error message if no tag found."
ifHasClassTag
public void ifHasClassTag(String template,
Properties attributes)
throws XDocletException
Evaluates the body if current class has at least one tag with the specified name.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "tagName"
optional = "false"
description = "The tag name."
- name = "paramName"
description = "The parameter name. If not specified, then the raw
content of the tag is returned."
- name = "paramNum"
description = "The zero-based parameter number. It's used if the user
used the space-separated format for specifying parameters."
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
- name = "error"
description = "Show this error message if no tag found."
ifIsClassAbstract
public void ifIsClassAbstract(String template)
throws XDocletException
Evaluate the body block if current class is abstract.
template
- The body of the block tag
ifIsClassNotAbstract(java.lang.String)
ifIsClassNotAbstract
public void ifIsClassNotAbstract(String template)
throws XDocletException
Evaluate the body block if current class is not abstract.
template
- The body of the block tag
ifIsClassAbstract(java.lang.String)
importedList
public String importedList(Properties attributes)
throws XDocletException
Make sure the template file uses full qualified class names everywhere instead.
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.
attributes
- The attributes of the template tag
- name = "currentClass"
optional = "false"
description = "???"
modifiers
public String modifiers()
throws XDocletException
The current class' modifiers.
pushClass
public void pushClass(String template,
Properties attributes)
throws XDocletException
Pushes the class specified by value parameter to top of stack making it the current class.
template
- The body of the block tagattributes
- The attributes of the template tag
- name = "value"
optional = "false"
values = "return-type,whatever class name"
description = "If return-type specified then push current method return type, else find the XClass for the
class name and push it."
symbolicClassName
public String symbolicClassName()
throws XDocletException
Returns the symbolic name of the current class. For a java bean it's the same as the class name.
- The symbolic name of the current class
transformedClassName
public String transformedClassName()
throws XDocletException
Returns the transformed name of the current class with package name.
- the name of the current class