vdoclet.docinfo
Class BaseInfo

java.lang.Object
  |
  +--vdoclet.docinfo.BaseInfo
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
BaseElementInfo

public abstract class BaseInfo
extends Object
implements Cloneable

Base class for stuff that has tags.


Constructor Summary
BaseInfo(String name)
           
 
Method Summary
 void addTag(String name, String value)
          Add a tag.
 void addTag(TagInfo tag)
          Add a tag.
 void addTags(Collection tags)
           
 Object clone()
           
 String getComment()
          Get the comment
 String getName()
          Get the name
 TagInfo getTag(String name)
          Get the first tag with the given name, or null if there isn't one.
 List getTags()
          Get all tags.
 List getTags(String name)
          Get all tags with the given name.
 String getTagValue(String name)
          Get the value of first tag with the given name.
 String getTagValue(String name, String defaultValue)
          Get the value of first tag with the given name.
 void setComment(String comment)
          Get the comment
 void setName(String name)
          Set the name
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseInfo

public BaseInfo(String name)
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

getName

public String getName()
Get the name


setName

public void setName(String name)
Set the name


setComment

public void setComment(String comment)
Get the comment


getComment

public String getComment()
Get the comment


addTag

public void addTag(TagInfo tag)
Add a tag. Duplicates are allowed.


addTag

public void addTag(String name,
                   String value)
Add a tag. Duplicates are allowed.


addTags

public void addTags(Collection tags)

getTags

public List getTags()
Get all tags.

Returns:
List(TagInfo)

getTags

public List getTags(String name)
Get all tags with the given name.

Returns:
List(TagInfo)

getTag

public TagInfo getTag(String name)
Get the first tag with the given name, or null if there isn't one.


getTagValue

public String getTagValue(String name)
Get the value of first tag with the given name. Return null if the tag is not present.


getTagValue

public String getTagValue(String name,
                          String defaultValue)
Get the value of first tag with the given name. Return the specified default value if the tag is not present.