Guest User

Untitled

a guest
Mar 12th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public final class ModuleRegistry {
  2.  
  3.     private static final class Holder {
  4.         private static final ModuleRegistry instance = new ModuleRegistry();
  5.     }
  6.  
  7.     private ModuleRegistry() {
  8.         Reflections reflections = new Reflections("");
  9.         // Some components registration
  10.     }
  11.  
  12.     public static ModuleRegistry getInstance() {
  13.         return Holder.instance;
  14.     }
  15. }
  16.  
  17. public final class Main{
  18.     public static void main(String[] args){
  19.         // Let's eagerly initialize everything
  20.         // RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT here
  21.         ModuleRegistry.getInstance();
  22.        
  23.        // Do all the work
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment