## Constructor

Implemented in class xdoclet.tagshandler.ConstructorTagsHandler.

- Block Tags
- Content Tags

### Block Tags:

#### setCurrentConstructor (block template)

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.

name | The name of the constructor we're searching for its existence in current class.
[parameters] | We're searching for a constructor that has the exact set of parameters specified in parameters param.
[delimiter] | The parameters param is delimited by the string specified in delimiter parameter.

#### exceptionList (block template)

Iterates over all exceptions thrown by the current constructor and returns a string containing definition of all those exceptions.

[constructor] | The constructor name of which exceptions list is extracted. If not specified then current constructor is used.
[skip] | A comma-separated list of exceptions that should be skipped and not put into the list.
[append] | A comma-separated list of exceptions that should be always appended regardless if current constructor has that constructor defined or not.

#### forAllClassConstructors (block template)

Loops through all constructors for all classes after first sorting all the constructors.

[type] | For all classes by the type.
[extent] | 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. Valid Values = {concrete-type,superclass,hierarchy}

#### forAllConstructors (block template)

Iterates over all constructors of current class and evaluates the body of the tag for each constructor.

[superclasses] | If true then traverse superclasses also, otherwise look up the tag in current concrete class only. Valid Values = {true,false}
[sort] | If true then sort the constructors list. Valid Values = {true,false}

#### ifDoesntHaveConstructorTag (block template)

Evaluates the body if current constructor doesn't have at least one tag with the specified name.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.
[error] | Show this error message if no tag found.

#### ifHasConstructorTag (block template)

Evaluates the body if current constructor has at least one tag with the specified name.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.
[error] | Show this error message if no tag found.

#### executeAndRestoreConstructor (block template)

Evaluate the current block, and then restore the current constructor before continuing.

#### ifConstructorTagValueEquals (block template)

Evaluates the body if value for the constructor tag equals the specified value.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.

#### ifConstructorTagValueNotEquals (block template)

Evaluates the body if value for the constructor tag not equals the specified value.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.

#### forAllConstructorTags (block template)

Iterates over all tags of current constructor and evaluates the body of the tag for each constructor.

tagName | The tag name.

#### forAllConstructorTagTokens (block template)

Iterates over all tokens in current constructor tag with the name tagName and evaluates the body for every token.

tagName | The tag name.
[delimiter] | delimiter for the StringTokenizer. consult javadoc for java.util.StringTokenizer default is ','
[skip] | how many tokens to skip on start

#### ifHasConstructor (block template)

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.

name | The name of the constructor we're searching for its existence in current class.
[parameters] | We're searching for a constructor that has the exact set of parameters specified in parameters param.
[delimiter] | The parameters param is delimited by the string specified in delimiter parameter.

#### ifDoesntHaveConstructor (block template)

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.

name | The name of the constructor we're searching for its existence in current class.
[parameters] | We're searching for a constructor that has the exact set of parameters specified in parameters param.
[delimiter] | The parameters param is delimited by the string specified in delimiter parameter.

### Content templates:

#### constructorComment (content template)

The comment for the current constructor.

[no-comment-signs] | If true then don't decorate the comment with comment signs. Valid Values = {true,false}

#### constructorTagValue (content template)

Iterates over all constructor tags with the specified tagName for the current constructor probably inside of a forAllConstructorTags body.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.
[values] | The valid values for the parameter, comma separated. An error message is printed if the parameter value is not one of the values.
[default] | The default value is returned if parameter not specified by user for the tag.

#### firstSentenceDescriptionOfCurrentConstructor (content template)

Return standard javadoc of current constructor.

#### constructorName (content template)

Returns the name of the current constructor.

#### getClassNameFor (content template)

Returns the not-full-qualified name of the current class without the package name.

#### getFullClassNameFor (content template)

Returns the full-qualified name of the current class with the package name.

#### getFullSuperclassNameFor (content template)

Returns the full-qualified name of the superclass of the current class.

#### setMatchValue (content template)

Sets the vaSoulue of match variable.

value | The new value for matchPattern.

#### matchValue (content template)

Returns 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 template.

#### currentToken (content template)

Returns current token inside forAllClassTagTokens.

#### skipToken (content template)

Skips current token. Returns empty string.