// $Id: Example.java,v 1.4 2003/08/11 20:04:35 rlv Exp $ // $Source: /h/cm/style/examples/Example.java,v $ // Copyright 2001-2003 YoyoDyne, all rights reserved. // package com.yoyodyne.antigravity; // Import java packages. import java... // Import other packages. import ... /** * This is an example class provided to illustrate how to document at the * class level. This section is filled with a high level description of * the purpose of this class. Examples can be shown here for a class * with a small number of simple methods. If the methods are complex, * the examples can be done before the methods themselves. * * @author YoyoDyne/Anti-gravity * @version 001.00 */ public class Example { /** * {A description of this method, potentially including an example} * * @param p1 {A one line description of parameter p1} * @returns An incremented value. * @see {other related classes} * @throws {mention thrown exceptions} */ public int method(int p1) throws MyException { // Let's check p1. if(p1 > 3) { // It's > 3. System.out.println("p1 is > 3"); } else { // Oh well, it's too small. System.out.println("p1 is not > 3"); throw new MyException("p1 is not > 3"); } return p1+1; } /** * A description of a field. */ private Hashtable ht; /** A oneline description of a field. */ private ArrayList al; } // End of File.