@Test public void should_handle_default() { assertNull(Dispatcher.execute("x")); }
public static Object execute(String name, Object... args) { final Handler handler = ref.get().get(name); if (handler == null) { return DefaultHandler.INSTANCE.execute(args); } else { return handler.execute(args); } }
Dispatcher { public static Object execute(String name, Object... args) { final Handler handler = ref.get().get(name); if (handler == null) { return DefaultHandler.INSTANCE.execute(args); } else { return handler.execute(args); } } }
Dispatcher { public static Object execute(String name, Object... args) { final Handler handler = ref.get().get(name); if (handler == null) { return DefaultHandler.INSTANCE.execute(args); } else { return handler.execute(args); } } private  Dispatcher(); }
Dispatcher { public static Object execute(String name, Object... args) { final Handler handler = ref.get().get(name); if (handler == null) { return DefaultHandler.INSTANCE.execute(args); } else { return handler.execute(args); } } private  Dispatcher(); static Object execute(String name, Object... args); }
Dispatcher { public static Object execute(String name, Object... args) { final Handler handler = ref.get().get(name); if (handler == null) { return DefaultHandler.INSTANCE.execute(args); } else { return handler.execute(args); } } private  Dispatcher(); static Object execute(String name, Object... args);  }