From 9755152e9fbb8de5c6da3d7d0e9ed5924c75b742 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Thu, 12 Jun 2014 13:22:34 -0700 Subject: [PATCH] Clarify code organization of static methods and visibility Change-Id: Ia4eb8f949857a8d21965025aa1f5bab26eaf9920 --- Documentation/dev-contributing.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/dev-contributing.txt b/Documentation/dev-contributing.txt index 5e307f9827..95a555428e 100644 --- a/Documentation/dev-contributing.txt +++ b/Documentation/dev-contributing.txt @@ -171,11 +171,13 @@ Here are some guidelines that Gerrit uses: * Define any static interfaces next in your class. * Define non static interfaces after static interfaces in your 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 methods. - * Some common exceptions are private helper static methods which - might appear near the instance methods which they help. + * Some common exceptions are private helper static methods, which + 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 be near each other baring a good reason not to. * If you are using assisted injection, the factory for your class