xdoclet.tagshandler

Class ConstructorTagsHandler

public class ConstructorTagsHandler extends AbstractProgramElementTagsHandler

Version: $Revision: 1.13 $

Author: Jerome Bernard (jerome.bernard@xtremejava.com)

UNKNOWN: Jan 18, 2002 namespace = "Constructor"

Method Summary
StringconstructorComment(Properties attributes)
The comment for the current constructor.
StringconstructorName(Properties attributes)
Returns the name of the current constructor.
StringconstructorTagValue(Properties attributes)
Iterates over all constructor tags with the specified tagName for the current constructor probably inside of a forAllConstructorTags body.
StringcurrentConstructorName()
Returns the current constructor name.
StringexceptionList(Properties attributes)
Iterates over all exceptions thrown by the current or specified constructor and returns a string containing definition of all those exceptions.
voidexecuteAndRestoreConstructor(String template, Properties attributes)
Evaluate the current block, and then restore the current constructor before continuing.
StringfirstSentenceDescriptionOfCurrentConstructor()
Return standard javadoc of current constructor.
voidforAllClassConstructors(String template, Properties attributes)
Loops through all constructors for all classes after first sorting all the constructors.
voidforAllConstructors(String template, Properties attributes)
Iterates over all constructors of current class and evaluates the body of the tag for each constructor.
voidforAllConstructorTags(String template, Properties attributes)
Iterates over all tags of current constructor and evaluates the body of the tag for each constructor.
voidforAllConstructorTagTokens(String template, Properties attributes)
Iterates over all tokens in current constructor tag with the name tagName and evaluates the body for every token.
voidifConstructorTagValueEquals(String template, Properties attributes)
Evaluates the body if value for the constructor tag equals the specified value.
voidifConstructorTagValueNotEquals(String template, Properties attributes)
Evaluates the body if value for the constructor tag not equals the specified value.
voidifDoesntHaveConstructor(String template, Properties attributes)
Evaluate the body if current class doesn't have a constructor with the specified name+parameters.
voidifDoesntHaveConstructorTag(String template, Properties attributes)
Evaluates the body if current constructor doesn't have at least one tag with the specified name.
voidifHasConstructor(String template, Properties attributes)
Evaluate the body if current class has a constructor with the specified name+parameters.
voidifHasConstructorTag(String template, Properties attributes)
Evaluates the body if current constructor has at least one tag with the specified name.
Stringmodifiers()
Describe what the method does
voidsetCurrentConstructor(String template, Properties attributes)
Evaluate the body if current class has a constructor with the specified name+parameters.

Method Detail

constructorComment

public String constructorComment(Properties attributes)
The comment for the current constructor.

Parameters: attributes The attributes of the template tag

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

See Also: classComment

UNKNOWN: type = "content" name = "no-comment-signs" optional = "true" values = "true,false" description = "If true * then don't decorate the comment with comment signs." name = "indent" optional = "true" description = "Number of spaces to indent the comment. * Default is 0."

constructorName

public String constructorName(Properties attributes)
Returns the name of the current constructor.

Parameters: attributes The attributes of the template tag

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

UNKNOWN: type = "content"

constructorTagValue

public String constructorTagValue(Properties attributes)
Iterates over all constructor tags with the specified tagName for the current constructor probably inside of a forAllConstructorTags body.

Parameters: attributes The attributes of the template tag

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

UNKNOWN: type = "content" 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."

currentConstructorName

public String currentConstructorName()
Returns the current constructor name. Used inside block elements.

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

exceptionList

public String exceptionList(Properties attributes)
Iterates over all exceptions thrown by the current or specified constructor and returns a string containing definition of all those exceptions.

Parameters: attributes The attributes of the template tag

Returns: throws clause for the constructor

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" name = "constructor" optional = "true" description = "The constructor name of which * exceptions list is extracted. If not specified then current constructor is used." name = "skip" optional = "true" description = "A comma-separated list of exceptions that * should be skipped and not put into the list." name = "append" optional = "true" description = "A comma-separated list of exceptions that * should be always appended regardless if current constructor has that exception defined or not."

executeAndRestoreConstructor

public void executeAndRestoreConstructor(String template, Properties attributes)
Evaluate the current block, and then restore the current constructor before continuing.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

firstSentenceDescriptionOfCurrentConstructor

public String firstSentenceDescriptionOfCurrentConstructor()
Return standard javadoc of current constructor.

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

UNKNOWN: type = "content"

forAllClassConstructors

public void forAllClassConstructors(String template, Properties attributes)
Loops through all constructors for all classes after first sorting all the constructors.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" 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."

forAllConstructors

public void forAllConstructors(String template, Properties attributes)
Iterates over all constructors of current class and evaluates the body of the tag for each constructor.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" name = "superclasses" optional = "true" values = "true,false" description = "If true then * traverse superclasses also, otherwise look up the tag in current concrete class only." name = "sort" optional = "true" values = "true,false" description = "If true then sort the * constructors list."

forAllConstructorTags

public void forAllConstructorTags(String template, Properties attributes)
Iterates over all tags of current constructor and evaluates the body of the tag for each constructor.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name."

forAllConstructorTagTokens

public void forAllConstructorTagTokens(String template, Properties attributes)
Iterates over all tokens in current constructor 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

UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name." 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"

ifConstructorTagValueEquals

public void ifConstructorTagValueEquals(String template, Properties attributes)
Evaluates the body if value for the constructor 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

UNKNOWN: type = "block" 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."

ifConstructorTagValueNotEquals

public void ifConstructorTagValueNotEquals(String template, Properties attributes)
Evaluates the body if value for the constructor 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

UNKNOWN: type = "block" 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."

ifDoesntHaveConstructor

public void ifDoesntHaveConstructor(String template, Properties attributes)
Evaluate the body if current class doesn't have a constructor with the specified name+parameters. If parameters not specified then any constructor with the given name and any set of parameters is considered equal to the given constructor name and so the test result is positive and the body is evaluated.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

See Also: ConstructorTagsHandler

UNKNOWN: type = "block" name = "name" optional = "false" description = "The name of the constructor we're * searching for its existence in current class." name = "parameters" optional = "true" description = "We're searching for a constructor * that has the exact set of parameters specified in parameters param." name = "delimiter" optional = "true" description = "The parameters param is delimited by * the string specified in delimiter parameter."

ifDoesntHaveConstructorTag

public void ifDoesntHaveConstructorTag(String template, Properties attributes)
Evaluates the body if current constructor 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

UNKNOWN: type = "block" 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 = "error" description = "Show this error message if no tag found."

ifHasConstructor

public void ifHasConstructor(String template, Properties attributes)
Evaluate the body if current class has a constructor with the specified name+parameters. If parameters not specified then any constructor with the given name and any set of parameters is considered equal to the given constructor name and so the test result is positive and the body is evaluated. This constructor does not change the current constructor to the one specified.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

See Also: ConstructorTagsHandler

UNKNOWN: type = "block" name = "name" optional = "false" description = "The name of the constructor we're * searching for its existence in current class." name = "parameters" optional = "true" description = "We're searching for a constructor * that has the exact set of parameters specified in parameters param." name = "delimiter" optional = "true" description = "The parameters param is delimited by * the string specified in delimiter parameter."

ifHasConstructorTag

public void ifHasConstructorTag(String template, Properties attributes)
Evaluates the body if current constructor 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

UNKNOWN: type = "block" 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 = "error" description = "Show this error message if no tag found."

modifiers

public String modifiers()
Describe what the method does

Returns: Describe the return value

Throws: XDocletException Describe the exception

setCurrentConstructor

public void setCurrentConstructor(String template, Properties attributes)
Evaluate the body if current class has a constructor with the specified name+parameters. If parameters not specified then any constructor with the given name and any set of parameters is considered equal to the given constructor name and so the test result is positive and the body is evaluated. This constructor change the current constructor to the one specified.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

See Also: ConstructorTagsHandler

UNKNOWN: type = "block" name = "name" optional = "false" description = "The name of the constructor we're * searching for its existence in current class." name = "parameters" optional = "true" description = "We're searching for a constructor * that has the exact set of parameters specified in parameters param." name = "delimiter" optional = "true" description = "The parameters param is delimited by * the string specified in delimiter parameter."