Indentifier
| Case
| Example
|
Class
| Pascal
| Application
|
Enum
| Pascal
| ErrorLevel
|
Enum Value
| Upper with underscores
| FATAL
|
Exception Class
| Pascal
| DataAccessException (always ends with Exception)
|
Annotation
| Pascal
| Field
|
Interface
| Pascal
| Closeable
|
Method
| Camel
| toString
|
Package
| Lower
| org.example
|
Parameter
| Camel
| parameterName
|
Accessor
| Camel
| [get|set]Field (usually similar to field name)
|
Field
| Camel
| classField
|
Constant
| Upper with underscores
| STATIC_FIELD
|
Local Variable
| Camel
| localVariable
|
Type parameter
| Pascal
| T, E or T<Descriptive Name>
|
Comments
Introduction
All source code documenting inside source files has to follow Java language specification (“Documentation Comments” appendix). Specific additions are described in the following sub-sections.
Class comments
It’s recommended to provide enough details on each source code part (method, class, etc) in accordance with Java language specification. At least class general description and @author section is absolutely mandatory. No file should be delivered without this part of source code documentation.