public abstract class ExtensionPoint
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ExtensionPoint.ClassMap<T>
A map based extension point which allows to register keyed implementations ie.
|
static class |
ExtensionPoint.ClassSet<T>
A set based extension point which allows to register extended classes that might be used to chain additional functionality etc.
|
static class |
ExtensionPoint.InstanceMap<K,V>
A an instance of a map, mapping one instance value to another.
|
static class |
ExtensionPoint.SelectedType<T>
A Type extension point which basically allows to registered keyed extensions like
ExtensionPoint.ClassMap
but doesn't instantiate and bind all the registered key value pairs but instead replace a singleton based on a given setting via ExtensionPoint.SelectedType.bindType(Binder, Settings, String, String)
Note: bind(Binder) is not supported by this class |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name |
protected java.lang.Class<?>[] |
singletons |
Constructor and Description |
---|
ExtensionPoint(java.lang.String name,
java.lang.Class<?>... singletons)
Creates a new extension point
|
Modifier and Type | Method and Description |
---|---|
void |
bind(Binder binder)
Binds the extension as well as the singletons to the given guice binder.
|
protected abstract void |
bindExtensions(Binder binder)
Subclasses can bind their type, map or set extensions here.
|
protected final java.lang.String name
protected final java.lang.Class<?>[] singletons
public ExtensionPoint(java.lang.String name, java.lang.Class<?>... singletons)
name
- the human readable underscore case name of the extension point. This is used in error messages etc.singletons
- a list of singletons to bind with this extension point - these are bound in bind(Binder)