xdoclet.tagshandler
Class FieldTagsHandler

java.lang.Object
  extended by xdoclet.template.TemplateTagHandler
      extended by xdoclet.XDocletTagSupport
          extended by xdoclet.tagshandler.AbstractProgramElementTagsHandler
              extended by xdoclet.tagshandler.FieldTagsHandler

public class FieldTagsHandler
extends AbstractProgramElementTagsHandler

Version:
$Revision: 1.16 $
Author:
Aslak Helles?y
xdoclet.taghandler
namespace = "Field"
created
13. januar 2002

Field Summary
 
Fields inherited from class xdoclet.tagshandler.AbstractProgramElementTagsHandler
currentToken, matchPattern, tagTokenizer
 
Fields inherited from class xdoclet.XDocletTagSupport
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER
 
Constructor Summary
FieldTagsHandler()
           
 
Method Summary
 java.lang.String fieldComment(java.util.Properties attributes)
          The comment for the current field.
 java.lang.String fieldName()
          Returns the name of the current field.
 java.lang.String fieldTagValue(java.util.Properties attributes)
          Iterates over all field tags with the specified tagName for the current field probably inside of a forAllFieldTags body.
 java.lang.String fieldType()
          Returns the type of the current field.
 java.lang.String firstSentenceDescriptionOfCurrentField()
          Return standard javadoc of current field.
 void forAllFields(java.lang.String template, java.util.Properties attributes)
          Iterates over all fields of current class and evaluates the body of the tag for each field.
 void forAllFieldTags(java.lang.String template, java.util.Properties attributes)
          Iterates over all tags of current field and evaluates the body of the tag for each field.
 void forAllFieldTagTokens(java.lang.String template, java.util.Properties attributes)
          Iterates over all tokens in current field tag with the name tagName and evaluates the body for every token.
 java.lang.String getCapitalizedFieldName()
          Returns the capitalized name of the current field.
static java.lang.String getFieldTypeFor(xjavadoc.XField field)
          Gets the FieldTypeFor attribute of the FieldTagsHandler class
 void ifDoesntHaveFieldTag(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if current field doesnt have any tags with the specified name.
 void ifFieldTagValueEquals(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if value for the field tag equals the specified value.
 void ifHasFieldTag(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if current field has at least one tag with the specified name.
 java.lang.String modifiers()
          Describe what the method does
 
Methods inherited from class xdoclet.tagshandler.AbstractProgramElementTagsHandler
checkForWrap, currentToken, exceptionList, firstSentenceDescriptionOfCurrentMember, forAllMembers, forAllMemberTags, forAllMemberTagTokens, getAllClasses, getClassNameFor, getFullClassNameFor, getFullSuperclassNameFor, getIndentChars, getXExecutableMemberForMemberName, getXExecutableMemberForMemberName, hasExecutableMember_OLD, hasExecutableMember, makeCopyOfArray, matchValue, memberComment, setMatchValue, skipToken
 
Methods inherited from class xdoclet.XDocletTagSupport
delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
 
Methods inherited from class xdoclet.template.TemplateTagHandler
getXJavaDoc, setXJavaDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldTagsHandler

public FieldTagsHandler()
Method Detail

getFieldTypeFor

public static java.lang.String getFieldTypeFor(xjavadoc.XField field)
                                        throws XDocletException
Gets the FieldTypeFor attribute of the FieldTagsHandler class

Parameters:
field - Describe what the parameter does
Returns:
The FieldTypeFor value
Throws:
XDocletException - Describe the exception

getCapitalizedFieldName

public java.lang.String getCapitalizedFieldName()
                                         throws XDocletException
Returns the capitalized name of the current field.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

forAllFields

public void forAllFields(java.lang.String template,
                         java.util.Properties attributes)
                  throws XDocletException
Iterates over all fields of current class and evaluates the body of the tag for each field.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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 * fields list."

modifiers

public java.lang.String modifiers()
                           throws XDocletException
Describe what the method does

Returns:
Describe the return value
Throws:
XDocletException - Describe the exception

firstSentenceDescriptionOfCurrentField

public java.lang.String firstSentenceDescriptionOfCurrentField()
                                                        throws XDocletException
Return standard javadoc of current field.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

fieldName

public java.lang.String fieldName()
                           throws XDocletException
Returns the name of the current field.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

fieldComment

public java.lang.String fieldComment(java.util.Properties attributes)
                              throws XDocletException
The comment for the current field.

Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
See Also:
ClassTagsHandler.classComment(java.util.Properties)
doc.tag
type = "content"
doc.param
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."

forAllFieldTags

public void forAllFieldTags(java.lang.String template,
                            java.util.Properties attributes)
                     throws XDocletException
Iterates over all tags of current field and evaluates the body of the tag for each field.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "tagName" optional = "false" description = "The tag name.", name = "superclasses" optional = "true" values = "true,false" description = "If true then * traverse superclasses also, otherwise look up the tag in current concrete class only. Default is true."

forAllFieldTagTokens

public void forAllFieldTagTokens(java.lang.String template,
                                 java.util.Properties attributes)
                          throws XDocletException
Iterates over all tokens in current field 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
doc.tag
type = "block"
doc.param
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"

fieldTagValue

public java.lang.String fieldTagValue(java.util.Properties attributes)
                               throws XDocletException
Iterates over all field tags with the specified tagName for the current field probably inside of a forAllFieldTags body.

Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"
doc.param
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."

fieldType

public java.lang.String fieldType()
                           throws XDocletException
Returns the type of the current field.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

ifHasFieldTag

public void ifHasFieldTag(java.lang.String template,
                          java.util.Properties attributes)
                   throws XDocletException
Evaluates the body if current field 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
doc.tag
type = "block"
doc.param
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" optional = "true" values = "true,false" description = "If true then * traverse superclasses also, otherwise look up the tag in current concrete class only. Default is true.", name = "error" description = "Show this error message if no tag found."

ifDoesntHaveFieldTag

public void ifDoesntHaveFieldTag(java.lang.String template,
                                 java.util.Properties attributes)
                          throws XDocletException
Evaluates the body if current field doesnt have any tags with the specified name.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

ifFieldTagValueEquals

public void ifFieldTagValueEquals(java.lang.String template,
                                  java.util.Properties attributes)
                           throws XDocletException
Evaluates the body if value for the field 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
doc.tag
type = "block"
doc.param
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."

http://xdoclet.sourceforge.net/