Clarify code organization of static methods and visibility
Change-Id: Ia4eb8f949857a8d21965025aa1f5bab26eaf9920
This commit is contained in:
parent
a0c3ba5a4d
commit
9755152e9f
@ -171,11 +171,13 @@ Here are some guidelines that Gerrit uses:
|
|||||||
* Define any static interfaces next in your class.
|
* Define any static interfaces next in your class.
|
||||||
* Define non static interfaces after static interfaces in your
|
* Define non static interfaces after static interfaces in your
|
||||||
class.
|
class.
|
||||||
* Next you should define static types and members.
|
* Next you should define static types, members, and methods, in
|
||||||
|
decreasing order of visibility (public to private).
|
||||||
* Finally instance members, then constructors, and then instance
|
* Finally instance members, then constructors, and then instance
|
||||||
methods.
|
methods.
|
||||||
* Some common exceptions are private helper static methods which
|
* Some common exceptions are private helper static methods, which
|
||||||
might appear near the instance methods which they help.
|
might appear near the instance methods which they help (but may
|
||||||
|
also appear at the top).
|
||||||
* Getters and setters for the same instance field should usually
|
* Getters and setters for the same instance field should usually
|
||||||
be near each other baring a good reason not to.
|
be near each other baring a good reason not to.
|
||||||
* If you are using assisted injection, the factory for your class
|
* If you are using assisted injection, the factory for your class
|
||||||
|
Loading…
Reference in New Issue
Block a user