So, I'm on a team in a Software Engineering class. We've written a simple class that stores information about the software. One of my teammates insists that there's a way to read information from your own Javadoc in the code.
For example, say I have the following comment at the start of this class:
/**
* loren ipsum
*
* @author John Smith
* @version 1.2.3.4
*/
Because I'm a programmer who cannot tolerate changing any number by hand more than once, I want EVERYTHING to change when I change the @version tag. For example, in my getter method, I want a String representation of the version.
public String getVersion()
{
return (some code to get what follows the @version tag)
}
Is there a way to do this, or do I just put in a class constant with the version number and change both that and the tag whenever we update it?
If this question is thoroughly ridiculous, my apologies, but we've been discussing this for 15 minutes now and can't seem to find anything.
Thanks in advance!