public abstract class ExtensionPoint extends 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 registerd 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 String |
name |
protected Class<?>[] |
singletons |
Constructor and Description |
---|
ExtensionPoint(String name,
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.
|
public ExtensionPoint(String name, 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)
Copyright © 2009–2016. All rights reserved.