Difference between revisions of "Coding conventions"
(Created page with "This page contains some coding convention for PlayOnLinux 5. == Naming convention == * '''Classes''' name should start with a capital letter. Each words should be separated...") (Tag: visualeditor) |
(No difference)
|
Revision as of 20:15, 7 May 2015
This page contains some coding convention for PlayOnLinux 5.
Naming convention
- Classes name should start with a capital letter. Each words should be separated with a capital letters
- Methods and attributes should start with a lower case. Each words should be separated with a capital letters
- Variable types should be fully written in capital letters. Each words should be separated with a underscore (_)
Exemple:
public abstract class CancelerSynchroneousMessage<RESULT_TYPE> extends SynchroneousMessage implements CancelerMessage {
private Boolean processCanceled = false;
public RESULT_TYPE getResponse() throws InterruptedException, CancelException {
RESULT_TYPE response = (RESULT_TYPE) super.getResponse();
if(this.processCanceled) {
throw new CancelException();
}
return response;
}
public void sendCancelSignal() {
this.processCanceled = true;
super.semaphore.release();
}
}