Handles field level tag's for configuring a bean's environment.
doGenerate
protected void doGenerate(String template)
throws xdoclet.XDocletException
Called for each tag in the forTags
loop. The default behaviour is to call generate(template)
xdoclet.XDocletException
- if an error occures
forAllMemberTags
public void forAllMemberTags(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the template for all method- and field-level tags with the passed name
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "tagName"
optional = "false"
description = "the tag name"
- name = "paramName"
optional = "true"
description = "the required parameter"
- name = "paramValue"
optional = "true"
description = "the value for the required parameter"
forAllMethodTags
public void forAllMethodTags(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the template for all method-level tags with the passed name
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "tagName"
optional = "false"
description = "the tag name"
- name = "paramName"
optional = "true"
description = "the required parameter"
- name = "paramValue"
optional = "true"
description = "the value for the required parameter"
forAllTags
public void forAllTags(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the template for all class-, method- and field-level tags with the passed name
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "tagName"
optional = "false"
description = "the tag name"
- name = "paramName"
optional = "true"
description = "the required parameter"
- name = "paramValue"
optional = "true"
description = "the value for the required parameter"
forTags
protected void forTags(String template,
Properties attributes,
boolean forClass,
boolean forMethod,
boolean forField)
throws xdoclet.XDocletException
Executes the passed template for the passed
template
- the templateattributes
- the parametersforClass
- indicates whether the template should be excuted for class level tagsforMethod
- indicates whether the template should be excuted for method level tagsforField
- indicates whether the template should be excuted for field level tags
xdoclet.XDocletException
- if an error occures
ifHasParam
public void ifHasParam(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the current tag has a specified parameter
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the parameter"
ifHasTag
public void ifHasTag(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the current class has at least one ot the passed tags at field- or method-level
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "tagName"
optional = "false"
description = "the tag names (comma separated)"
- name = "paramName"
optional = "true"
description = "tags must have this parameter"
- name = "paramValue"
optional = "true"
description = "tags must have this value for the
parameter with 'paramName'"
ifHasType
public void ifHasType(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the current tag is either a method- or fiel-level tag or has a type parameter.
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the name parameter"
ifNotPrimitiveMember
public void ifNotPrimitiveMember(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the current field type or method return type is not a primitive.
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
ifParamValueEquals
public void ifParamValueEquals(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the specified tag's value is equal to the specified value
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the parameter"
- name = "value"
optional = "false"
description = "the value of the parameter"
ifParamValueNotEquals
public void ifParamValueNotEquals(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the specified tag's value is equal to the specified value
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the parameter"
- name = "value"
optional = "false"
description = "the value of the parameter"
ifPrimitiveMember
public void ifPrimitiveMember(String template,
Properties attributes)
throws xdoclet.XDocletException
Executes the body only if the current field type or method return type is primitive.
template
- the templateattributes
- the attributes
xdoclet.XDocletException
- if an error occures
memberName
public String memberName(Properties attributes)
throws xdoclet.XDocletException
Returns the method or field name. Can only be used inside forAllMemberTags
or forAllMethodTags
.
attributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "prefix"
optional = "true"
description = "the prefix for the name"
memberType
public String memberType()
throws xdoclet.XDocletException
Returns the method's return type or the field's type. Can only be used inside forAllMemberTags
or
forAllMethodTags
.
xdoclet.XDocletException
- if an error occures
methodSignature
public String methodSignature()
throws xdoclet.XDocletException
Returns the method signature for the current method. Can only be used inside forAllMethodTags
.
- the current method's signature
xdoclet.XDocletException
- if an error occures
name
public String name(Properties attributes)
throws xdoclet.XDocletException
Returns the name parameter value for the current tag. If the name parameter is not specified for a method- or
field-level tag, the member's name is returned. If the name parameter is not specified for a class level tag, an
error is generated.
attributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the name parameter"
paramValue
public String paramValue(Properties attributes)
throws xdoclet.XDocletException
Returns the value of a parameter.
attributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the parameter"
- 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 = "mandatory"
values = "true,false"
description = "Generate an error if parameter not
type
public String type(Properties attributes)
throws xdoclet.XDocletException
Returns the type parameter value for the current tag. Returns the field type for field-level tags and the return
value for method-level tags. For class-level tags, the value of the type parameter is returned. The wrapper class
is returned for primitive fields an methods with primitive return values.
attributes
- the attributes
xdoclet.XDocletException
- if an error occures
- name = "paramName"
optional = "false"
description = "the name of the type parameter"
- 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 = "mandatory"
values = "true,false"
description = "Generate an error if parameter not