org.codehaus.jam
Interface JTag

All Superinterfaces:
JElement
All Known Subinterfaces:
MTag

public interface JTag
extends JElement

Represents a javadoc tag. Includes helper methods for parsing tags containing complex name-value data. Different folks have different styles of encoding the pairs, so we provide different helper methods.

Author:
Patrick Calahan <email: pcal-at-bea-dot-com>

Method Summary
 java.lang.String getName()
          Returns the name of the tag.
 java.util.Properties getProperties_lineDelimited()
          Convenience method which parses the tag's contents as a series of line-delimited name=value pairs and returns them as a properties object.
 java.util.Properties getProperties_whitespaceDelimited()
          Convenience method which parses the tag's contents as a series of whitespace-delimited name=value pairs and returns them as a properties object.
 java.lang.String getText()
          Returns the raw contents of the tag, as return by javadoc's Tag.text() method.
 
Methods inherited from interface org.codehaus.jam.JElement
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, isSourceAvailable, toString
 

Method Detail

getName

java.lang.String getName()
Returns the name of the tag. The value will be the same as getSimpleName();


getText

java.lang.String getText()
Returns the raw contents of the tag, as return by javadoc's Tag.text() method.


getProperties_lineDelimited

java.util.Properties getProperties_lineDelimited()

Convenience method which parses the tag's contents as a series of line-delimited name=value pairs and returns them as a properties object. A line break is the only delimter between pairs, and the first '=' is taken as the delimeter between name and value.

For example, a javadoc tag 'my tag' with the following value: (at)mytag foo = this bar = "and" that baz = the other thing = true

would be returned as a Properties object containing three properties named foo, bar, and baz with values of "this", ""and"" that, and "the other thing = true", respectively.


getProperties_whitespaceDelimited

java.util.Properties getProperties_whitespaceDelimited()

Convenience method which parses the tag's contents as a series of whitespace-delimited name=value pairs and returns them as a properties object. Values containing whitespace must be quoted. Keys may not contain whitespace

For example, a javadoc tag 'my tag' with the following contents: (at)mytag foo = this bar = that this text is ignored baz = "but not this"

would be returned as a Properties object containing three properties named foo, bar, and baz with values of "this", "that", and "but not this".