org.sandev.generator.tags
Class FieldTagDefault

java.lang.Object
  extended by org.sandev.generator.tags.AbstractSandBaseTag
      extended by org.sandev.generator.tags.AbstractSandFieldTag
          extended by org.sandev.generator.tags.FieldTagDefault
All Implemented Interfaces:
com.sun.tools.doclets.Taglet

public class FieldTagDefault
extends AbstractSandFieldTag

Handle @sand.default declarations.

Declares a default value to be used for this field. The standard default values for each field type are:

All arrays are initialized to an empty array of length 0, so they can be tested without having to worry about them being null.

The default value given here will be textually substituted as a parameter value for the standard field mutator. So if you specify myvalue as a value for this tag, the ctor for this instance will contain a call to setMyField(myvalue). The limitations of what you can specify for this field are those of the java language for that circumstance.

Notes on use:

parameters:

  1. the default value
This tag does not support comments.


Field Summary
static java.lang.String CORENAME
          The core name of this tag.
protected  java.lang.String defaultStr
          The declared default value
static java.lang.String TAGNAME
          Our fixed name, used for hash lookup and text parsing.
 
Fields inherited from class org.sandev.generator.tags.AbstractSandBaseTag
PREFIX
 
Constructor Summary
FieldTagDefault()
           
 
Method Summary
static boolean exists(com.sun.javadoc.FieldDoc fd)
          Returns true if the given field contains this tag, false otherwise.
 java.lang.String getDefaultStr()
          accessor for defaultStr
static FieldTagDefault getFieldTagDefault(com.sun.javadoc.FieldDoc fd)
          Factory method for retrieving a new instance given a FieldDoc.
 java.lang.String getName()
          Return our tag name
 void init(com.sun.javadoc.Tag tag)
          Initialize this instance from the tag information.
static void register(java.util.Map tagletMap)
          Registers this taglet when triggered by the taglet declaration being loaded in as part of the build.
 void setDefaultStr(java.lang.String val)
          mutator for defaultStr
 java.lang.String toString(com.sun.javadoc.Tag tag)
          Return a documentation description of this tag.
 java.lang.String toString(com.sun.javadoc.Tag[] tags)
          Return the documentation text for when several of these tags are present
 
Methods inherited from class org.sandev.generator.tags.AbstractSandFieldTag
inField
 
Methods inherited from class org.sandev.generator.tags.AbstractSandBaseTag
inConstructor, inMethod, inOverview, inPackage, inType, isInlineTag, registerHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CORENAME

public static final java.lang.String CORENAME
The core name of this tag.

See Also:
Constant Field Values

defaultStr

protected java.lang.String defaultStr
The declared default value


TAGNAME

public static final java.lang.String TAGNAME
Our fixed name, used for hash lookup and text parsing.

See Also:
Constant Field Values
Constructor Detail

FieldTagDefault

public FieldTagDefault()
Method Detail

getDefaultStr

public java.lang.String getDefaultStr()
accessor for defaultStr


setDefaultStr

public void setDefaultStr(java.lang.String val)
mutator for defaultStr


init

public void init(com.sun.javadoc.Tag tag)
Initialize this instance from the tag information.


getName

public java.lang.String getName()
Return our tag name


register

public static void register(java.util.Map tagletMap)
Registers this taglet when triggered by the taglet declaration being loaded in as part of the build.


toString

public java.lang.String toString(com.sun.javadoc.Tag tag)
Return a documentation description of this tag.

Specified by:
toString in interface com.sun.tools.doclets.Taglet
Specified by:
toString in class AbstractSandBaseTag
Parameters:
tag - the Tag representation of this custom tag.

toString

public java.lang.String toString(com.sun.javadoc.Tag[] tags)
Return the documentation text for when several of these tags are present

Specified by:
toString in interface com.sun.tools.doclets.Taglet
Specified by:
toString in class AbstractSandBaseTag
Parameters:
tags - the array of Tags representing of this custom tag.

getFieldTagDefault

public static FieldTagDefault getFieldTagDefault(com.sun.javadoc.FieldDoc fd)
Factory method for retrieving a new instance given a FieldDoc. Returns an initialized instance of the tag in all cases.


exists

public static boolean exists(com.sun.javadoc.FieldDoc fd)
Returns true if the given field contains this tag, false otherwise.