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 |
---|
ExtensionPoint.InstanceMap(String name,
Class<K> keyType,
Class<V> valueType,
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 |
bind
public ExtensionPoint.InstanceMap(String name, Class<K> keyType, Class<V> valueType, Class<?>... singletons)
ExtensionPoint.ClassSet
name
- 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 value
IllegalArgumentException
- iff the key is already registeredprotected void bindExtensions(Binder binder)
ExtensionPoint
bindExtensions
in class ExtensionPoint
Copyright © 2009–2016. All rights reserved.