User Tools

Site Tools


info:java

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
info:java [2011/12/20 18:06] – formattning again moritzinfo:java [2015/02/26 08: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, i.e. no visibility modifier. If declared private, Java needs to generate synthetic accessor methods.
 +
 +
  
 ===== 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'', method ''getDecoration(Annotation annotation, Decoration decoration)''. It can be found around line 826 in 3.6.2. 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'', method ''getDecoration(Annotation annotation, Decoration decoration)''. It can be found around line 826 in 3.6.2.
info/java.1324400773.txt.gz · Last modified: 2011/12/20 18:06 by moritz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki