@Test(expected = IllegalStateException.class) public void no_defaults() { ApiStub<String> stub = new ApiStub<>(); stub.get(); }
public T get() { T impl = activeImplementation; if (impl != null) { return impl; } if (defaultImplementation != null) { return defaultImplementation; } throw new IllegalStateException( "there are no available active Asakusa Framework API implementations (internal error)"); }
ApiStub { public T get() { T impl = activeImplementation; if (impl != null) { return impl; } if (defaultImplementation != null) { return defaultImplementation; } throw new IllegalStateException( "there are no available active Asakusa Framework API implementations (internal error)"); } }
ApiStub { public T get() { T impl = activeImplementation; if (impl != null) { return impl; } if (defaultImplementation != null) { return defaultImplementation; } throw new IllegalStateException( "there are no available active Asakusa Framework API implementations (internal error)"); } ApiStub();  ApiStub(T defaultImplementation); }
ApiStub { public T get() { T impl = activeImplementation; if (impl != null) { return impl; } if (defaultImplementation != null) { return defaultImplementation; } throw new IllegalStateException( "there are no available active Asakusa Framework API implementations (internal error)"); } ApiStub();  ApiStub(T defaultImplementation); T get(); Reference<T> activate(T implementation); }
ApiStub { public T get() { T impl = activeImplementation; if (impl != null) { return impl; } if (defaultImplementation != null) { return defaultImplementation; } throw new IllegalStateException( "there are no available active Asakusa Framework API implementations (internal error)"); } ApiStub();  ApiStub(T defaultImplementation); T get(); Reference<T> activate(T implementation);  }