View Javadoc
1 package attrib4j.attributes; 2 /*** 3 * An attribute that will store the tag and text of Javadoc comments. 4 * The tag is what appears right after the @ symbol. The Javadoc 5 * comment is the text. 6 * 7 * @author <a href="mailto:mpollack@speakeasy.net">Mark Pollack</a> 8 * @version $Revision: 1.6 $ $Date: 2003/04/23 05:15:14 $ 9 */ 10 11 import attrib4j.Attribute; 12 13 public class JavadocAttribute implements Attribute { 14 15 /*** 16 * Create a JavadocAttribute with the tag and text of the Javadoc 17 * comment. 18 * 19 */ 20 public JavadocAttribute(String name, String text) { 21 //TODO: be more careful here to remove the leading @ symbol, if present. 22 _name = name.substring(1); 23 _text = text; 24 } 25 26 /*** 27 * Get the name of the Javadoc tag. Unlike the Doclet API this does not 28 * return the leading '@' symbol. 29 * 30 * @return the name of the Javadoc tag value. 31 */ 32 public String getName() { 33 return _name; 34 } 35 36 /*** 37 * Return the text of this tag, that is, portion beyond tag name. 38 * 39 * @return the text of this tag, that is, portion beyond tag name. 40 */ 41 public String getText() { 42 return _text; 43 } 44 45 /*** 46 * Return a pretty print textual description of the attribute. 47 * 48 * @return a pretty print textual description of the attribute. 49 */ 50 public String toString() { 51 return "JavadocAttribute: name = " + _name + " , text = " + _text; 52 } 53 54 /*** 55 * The name of the Javadoc tag. 56 */ 57 private String _name; 58 59 /*** 60 * The text of the tag. 61 */ 62 private String _text; 63 64 } // JavadocAttribute

This page was automatically generated by Maven