public static final class ExtensionPoint.InstanceMap<K,V> extends ExtensionPoint
ExtensionPoint.ClassMap<T>, ExtensionPoint.ClassSet<T>, ExtensionPoint.InstanceMap<K,V>, ExtensionPoint.SelectedType<T>name, singletons| Constructor and Description |
|---|
InstanceMap(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType,
java.lang.Class<?>... singletons)
Creates a new
ExtensionPoint.ClassSet |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindExtensions(Binder binder)
Subclasses can bind their type, map or set extensions here.
|
void |
registerExtension(K key,
V value)
Registers a mapping from
key to value |
bindpublic InstanceMap(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType,
java.lang.Class<?>... singletons)
ExtensionPoint.ClassSetname - the human readable underscore case name of the extension point. This is used in error messages.singletons - a list of singletons to bind with this extension point - these are bound in ExtensionPoint.bind(Binder)public final void registerExtension(K key, V value)
key to valuejava.lang.IllegalArgumentException - iff the key is already registeredprotected void bindExtensions(Binder binder)
ExtensionPointbindExtensions in class ExtensionPoint