T - the API typepublic class ApiStub<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiStub.Reference<T>
A reference of API implementation.
|
| Constructor and Description |
|---|
ApiStub()
Creates a new instance without default implementation.
|
ApiStub(T defaultImplementation)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ApiStub.Reference<T> |
activate(T implementation)
Activates the given API implementation on this stub.
|
T |
get()
Returns the current active implementation on this API stub.
|
public ApiStub()
public ApiStub(T defaultImplementation)
defaultImplementation - the default implementation (nullable)public T get()
IllegalStateException - if there are no available implementationspublic ApiStub.Reference<T> activate(T implementation)
implementation - the target implementationIllegalStateException - if another implementation has been activatedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.