This document describes how developers and contributors should write code to be included into the main CIlib tree. The reasoning behind these conventions is mainly for consistency, readability and maintainability.
All working files within the source tree of CIlib must adhere to the following conventions:
Style conventions applying to the project:
All classes are to be written following the JavaBeans Specification, barring a special reason. Such reasons include the class being a Singleton or Helper class that is not required during the XML to Java binding process.
The CIlib style for Java source files is generally accepted to be:
It is expected that all classes in CIlib have the appropriate Javadoc 5 comments attached to each method. Javadoc is extremely important for CIlib as the project is a library and users will constantly be referring to the API. The normal conventions described by Sun regarding Javadoc should be followed.
For package level Javadoc, CIlib uses the JDK5+ package-info.java package information.
References: All code that is written that is derived from a published article etc, will have the appropriate BibTeX entry in the class level Javadocs. The BibTeX reference should be placed in a <pre></pre> environment. Such references are extremely important and should be available in the Javadoc.
An important note about the {@inheritDoc} tag: please do not use this tag for classes that are not in CIlib. For example, if you have a class that extends a class or implements an interface that is defined in the JDK, the {@inheritDoc} annotation will fail to generate the expected Javadoc. You should rewrite / paraphrase the Javadoc to make the intention apparent.