Rules and Standards

CAA V5 Java Code Presentation

Presentation conventions to improve the readability of Java code
Technical Article

Abstract

This article gives you information on how to program Java classes and interfaces as regards code layout. CAA Use Cases are expected to respect these conventions.


Global layout

Each Java source contains a single class or interface.

The code presentation must obey the following order:

[Top]

Method layout

[Top]

Naming Conventions

As regards the other variables, using a prefix is optional.
The usually used prefixes are:

and, as for classes, an abbreviation of three or four characters is often used as a prefix:

[Top]

Comments

All the exposed entities (class, interface, public and protected methods and fields) must be preceded by a comment in the javadoc style. See Documenting Your Interfaces and Classes. But even the not exposed entities should be commented in the same way, particularly in the CAA use cases.
Moreover, C++ style comments should be used to give overviews of code and provide additional information to make the code easier to understand. However, redundant information must be avoided.
Comments are written at the third singular person (e.g., creates).

[Top]


History

Version: 1.0 [Sep 2000] Document created
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.