/**
* The <code>Bar</code> component doesn't do much of anything. It is just
* meant to demonstrate javadoc.
* <p>
*
* @version 2.4
* @author John Zukowski
*/
publicclass Bar {
/**
* A specific type of foo
*/
publicstaticfinalint FOO_TYPE = 0;
/**
* Another specific type of foo
*/
publicstaticfinalint ANOTHER_FOO_TYPE = 1;
/**
* The current foo type
*/
privateint type;
/**
* Constructs a Bar
*/
public Bar() {
type = FOO_TYPE;
}
/**
* Returns current foo type
*
* @return current foo type
* @deprecated As of version 2.3, use {@link #getFoo() getFoo()}instead
*/
publicint foo() {
return getFoo();
}
/**
* Returns current foo type
*
* @return current foo type
* @since V2.3
*/
publicint getFoo() {
return getFoo();
}
/**
* Changes current foo type
*
* @param type
* new type of foo
* @throws IllegalArgumentException
* When type invalid
*/
publicvoid setFoo(int newValue) {
if ((newValue != FOO_TYPE) && (newValue != ANOTHER_FOO_TYPE)) {
thrownew IllegalArgumentException("Bad type");
}
type = newValue;
}
/**
* Placeholder method for see tags
*
* @see Bar#FOO_TYPE
* @see Bar#getFoo()
* @see #getFoo()
* @see "My Book"
* @see <a href="http://www.jguru.com">jGuru </a>
*/
publicvoid myVoid() {
}
}