|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.taglets.demo.Demo
net.sourceforge.taglets.demo.block.Implementation
public class Implementation
Demonstration of block tags that show implementation details.
| Field Summary | |
|---|---|
static String |
CONSTANT
Constant demo. |
static String |
CONSTANT_OVERRIDE
Constant override demo. |
| Constructor Summary | |
|---|---|
Implementation()
|
|
| Method Summary | |
|---|---|
void |
equivalence()
Demo for the @equivalence block tag. |
void |
impl()
Demo for the @impl block tag. |
void |
testcase()
Demo for the @testcase block tag. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class net.sourceforge.taglets.demo.Demo |
|---|
blocks, stickies |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CONSTANT
By default the taglest collection adds an invisible block tag called @constant that contains the value of the constant.
The value is created as a link into the constant values list generated by JavaDoc.
"ConstantValue"public static final String CONSTANT_OVERRIDE
You can override the constant value automatically added by explicitly declaring a @constant block with any text you would like to see listed.
When overriding the constant tag no link is generated!
Example:
/** * @constant Used internally, do not use. */
| Constructor Detail |
|---|
public Implementation()
| Method Detail |
|---|
public void equivalence()
The @equivalence block tag can be used to describe convenience methods. Usually they are used to simplify usage of a class by providing a simple shortcut for often used complex method calls.
The equivalence tag usually describes a code sequence that, except for performance is equivalent to the code shown.
Check out toString() for an example usage.
Usage of the @equivalence tag:
/** * @equivalence anImplementation.impl(); */
impl();
toString()public void impl()
The @impl block tag is used to describe an implementation detail. It is especially handy when overriding a method (or implementing an interface method) and you want to keep the original method comment but want to add an additional implementation note.
To "inherit" the superclass documentation and simply add an implementation note use a JavaDoc comment in the following form:
Usage of the @impl tag:
/** * @impl Description of the implementation detail. */
Note:
Make sure that you only use block tags if you want to automatically "inherit" the superclass documentation.
Check out toString() for an example usage.
toString()public void testcase()
The @testcase may be used to list all unit test cases relevant for the given method and/or class.
net.sourceforge.taglets.demo.block.ImplementationTest
net.sourceforge.taglets.demo.block.AnotherImplementationTest
public String toString()
DemoIn general, the toString method returns a string that
"textually represents" this object. The result should be a
concise but informative representation that is easy for a person to read.
It is recommended that all subclasses override this method.
Default Implementation:
The default implementation of toString returns a string
consisting of the fully qualified name of the class of which the object
is an instance, the at-sign character `@', and the unsigned
hexadecimal representation of the hash code of the object. In other words,
this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class DemogetClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Taglets Collection 2.0.3 (Build 30)
2008/03/30 15:35:07
Copyright (c) 2002-2008 Bruno Essmann