Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public final class ModuleRegistry {
- private static final class Holder {
- private static final ModuleRegistry instance = new ModuleRegistry();
- }
- private ModuleRegistry() {
- Reflections reflections = new Reflections("");
- // Some components registration
- }
- public static ModuleRegistry getInstance() {
- return Holder.instance;
- }
- }
- public final class Main{
- public static void main(String[] args){
- // Let's eagerly initialize everything
- // RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT here
- ModuleRegistry.getInstance();
- // Do all the work
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment