|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.generator.tags.AbstractSandBaseTag
public abstract class AbstractSandBaseTag
Abstract base class for all SAND tag definitions. A tag definition
supports SandGenerator tag processing through existence testing,
and parameter access methods. It also supports tag documentation
through the javadoc taglet interface.
To set up a tag, define a new tag extending the appropriate subclass of this abstract base. To define the tag processing part:
FieldTagRange ftr=FieldTagRange.getFieldTagRange(fd);
if(ftr!=null) ...
NodeTagCall[] ntcs=NodeTagCall.getNodeTagCalls(cd);
if(ftes.length>0) ...
static boolean exists(FieldDoc fd) [or the
equivalent ClassDoc signature as appropriate] method to
allow for simple tag existence checking without the overhead of
initializing a new instance.
To set up the taglet processing part:
public String getName() method that returns
a String value that: @ sign which this
taglet picks up on
public static final String TAGNAME = PREFIX + "mytag";public static void register(Map tagletMap)
method as required by the taglet interface. This method is pure
boilerplate and always contains two lines of code. The first
creates a new instance of the taglet class, the second calls
registerHelper with the map and the instance.
public String toString(Tag tag) method
which translates the given Tag into an appropriate javadoc comment
text. If there will be more than one instance of this tag for
a given field or class, then define the
public String toString(Tag[] tags) method.
See the source of the existing tags for details.
| Field Summary | |
|---|---|
static java.lang.String |
PREFIX
This was originally set to the empty string, so all the tags were at the top level. |
| Constructor Summary | |
|---|---|
AbstractSandBaseTag()
|
|
| Method Summary | |
|---|---|
boolean |
inConstructor()
|
boolean |
inField()
|
boolean |
inMethod()
|
boolean |
inOverview()
|
boolean |
inPackage()
|
boolean |
inType()
|
boolean |
isInlineTag()
|
static void |
register(java.util.Map tagletMap)
Register this Taglet. |
static void |
registerHelper(java.util.Map tagletMap,
com.sun.tools.doclets.Taglet tag)
Helper method for register(java.util.Map). |
abstract java.lang.String |
toString(com.sun.javadoc.Tag tag)
Given the Tag representation of this custom
tag, return its string representation. |
abstract java.lang.String |
toString(com.sun.javadoc.Tag[] tags)
Given an array of Tags representing this custom
tag, return its string representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.tools.doclets.Taglet |
|---|
getName |
| Field Detail |
|---|
public static final java.lang.String PREFIX
| Constructor Detail |
|---|
public AbstractSandBaseTag()
| Method Detail |
|---|
public boolean inField()
inField in interface com.sun.tools.doclets.Tagletpublic boolean inConstructor()
inConstructor in interface com.sun.tools.doclets.Tagletpublic boolean inMethod()
inMethod in interface com.sun.tools.doclets.Tagletpublic boolean inOverview()
inOverview in interface com.sun.tools.doclets.Tagletpublic boolean inPackage()
inPackage in interface com.sun.tools.doclets.Tagletpublic boolean inType()
inType in interface com.sun.tools.doclets.Tagletpublic boolean isInlineTag()
isInlineTag in interface com.sun.tools.doclets.Tagletpublic static void register(java.util.Map tagletMap)
Not implemented. This static method must be implemented by each class extending from here for registration to work.
tagletMap - the map to register this tag to.
public static void registerHelper(java.util.Map tagletMap,
com.sun.tools.doclets.Taglet tag)
register(java.util.Map). This code is common to all
of our taglets, so there's no sense in reproducing it everywhere.
public abstract java.lang.String toString(com.sun.javadoc.Tag tag)
Tag representation of this custom
tag, return its string representation.
toString in interface com.sun.tools.doclets.Taglettag - the Tag representation of this custom tag.public abstract java.lang.String toString(com.sun.javadoc.Tag[] tags)
Tags representing this custom
tag, return its string representation.
toString in interface com.sun.tools.doclets.Taglettags - the array of Tags representing of this custom tag.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||