...
Identifier Type | Rules for Naming | Examples |
---|---|---|
Classes or inner classes | Class names should be nouns, in mixed case with the first letter of each word capitalised. Try to keep your class names simple and descriptive. Use whole words and avoid acronyms and abbreviations. | class Raster; |
Interfaces | Interface names should be capitalized like class names. | interface Enumeration; |
Methods | Methods should be verbs in mixed case with the first letter lowercase. Within each method name capital letters separate words. Property methods or get-set methods are used as follows: | run(); \\ |
Variables (except for (constant) static final variables and member variables) | All variables are in mixed case with a lowercase first letter. Words are separated by capital letters. | int index; |
Member variables | The same capitalisation as for normal variables prefixed with 'm_'. | int m_index; |
Constant (static final) variables | Names should be all uppercase with words separated by underscores ("_"). | public static final int BLACK = 99; |
Exceptions | Like class names; always ending in "Exception" | InputException |
Packages | Lowercase only; avoid lengthy package names; always start with org.apache.felix. | org.apache.felix.demo.bundle |
...