-
Enhancement
-
Resolution: Won't Fix
-
P5
-
None
-
1.1.6, 1.2.0
-
generic, x86, sparc
-
generic, solaris_2.6, windows_95
Name: tb29552 Date: 05/11/98
I wonder if you would consider an enhancement
request to include documentation tags to support
"Design By Contract" - @inv, Class Invariant;
@pre, Precondition; and @post, Postcondition.
Currently, I am using the following convoluted
html syntax to capture the relevant details:
/**
* Deposit money.
<p>
<font color="Teal">
<strong> Precondition: </strong>
</font>
<strong> [ amount > 0.00 ]; </strong>
<font color="Blue">
<em><strong> "Amount must be positive." </strong></em>
</font>
</p>
<p>
<font color="Teal">
<strong> Postcondition: </strong>
</font>
<strong> [ newBalance = oldBalance + amount ]; </strong>
<font color="Blue">
<em><strong> "New balance must be equal to old balance plus amount." </strong></em>
</font>
</p>
* @param amount java.lang.double
*/
public void deposit( double amount )
{
/* Update balance */
setBalance( amount );
/* Instruct observable component to notify IObservers to
pass SBAccountModel as observed and "state" as change code */
this.observableComponent.notifyIObservers( this, "balance" );
}
(Review ID: 30092)
======================================================================
- duplicates
-
JDK-4174664 proposed tags: @precondition & @postcondition
- Closed
- relates to
-
JDK-4071460 Please add assert capability to java language
- Resolved