User Tools

Site Tools


info:java_style

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
info:java_style [2015/03/10 09:19] moritzinfo:java_style [2015/03/10 09:20] (current) – [Objects] moritz
Line 8: Line 8:
 ===== Classes ===== ===== Classes =====
  
-  * All public class fields must be '''final static''': <code>public final static int MY_CONST = 3;</code> +  * All public class fields must be ''final static'': <code>public final static int MY_CONST = 3;</code> 
-  * Class members have to be named uppercase with underscore between words: <code>MAX_INTEGER</code>+  * Class members have to be named uppercase with underscore between words: ''MAX_INTEGER''
  
 ===== Objects ===== ===== Objects =====
  
-  * All fields must be <code>private</code> and only accessible through getters and setters. +  * All fields must be ''private'' and only accessible through getters and setters. 
-  * All fields must be <code>final</code> unless functionality requires mutability.+  * All fields must be ''final'' unless functionality requires mutability.
  
 ===== Constructors ==== ===== Constructors ====
  
-  * Constructors must not call any method unless it is '''private''' and in turn does not call any non-private method. +  * Constructors must not call any method unless it is ''private'' and in turn does not call any non-private method. 
-  * Fields assigned in the constructor must be '''private final'''+  * Fields assigned in the constructor must be ''private final''
  
info/java_style.1425975591.txt.gz · Last modified: 2015/03/10 09:19 by moritz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki