info:java
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
info:java [2011/12/20 17:05] – created moritz | info:java [2015/02/26 07:56] (current) – moritz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Java ====== | ====== Java ====== | ||
+ | |||
+ | ===== Code conventions ===== | ||
+ | |||
+ | * Classes have a name starting with an uppercase character, should contain a noun | ||
+ | * Methods start with a lowercase character and should contain a verb | ||
+ | * Packages are all lowercase | ||
+ | * Members start lowercase, or all uppercase if static | ||
+ | |||
+ | ==== Classes ==== | ||
+ | |||
+ | * Members are private in all cases, unless static | ||
+ | * Members initialized in constructor are final. | ||
+ | * Static members should be final, can be public in that case | ||
+ | |||
+ | Inner classes can divert from those rules, but should never be exported to outside the containing compilation unit. Declare all inner classes as package-private, | ||
+ | |||
+ | |||
===== Debugging annotations in Eclipse ===== | ===== Debugging annotations in Eclipse ===== | ||
- | To find out what's wrong with a text annotation (it's created, but nothing can be seen in the text viewer), set a break point on org.eclipse.jface.text.source.AnnotationPainter, | + | To find out what's wrong with a text annotation (it's created, but nothing can be seen in the text viewer), set a break point on '' |
info/java.1324400724.txt.gz · Last modified: 2011/12/20 17:05 by moritz