public static final class ExtensionPoint.SelectedType<T> extends ExtensionPoint.ClassMap<T>
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 bindType(Binder, Settings, String, String)
Note: ExtensionPoint.bind(Binder)
is not supported by this classExtensionPoint.ClassMap<T>, ExtensionPoint.ClassSet<T>, ExtensionPoint.InstanceMap<K,V>, ExtensionPoint.SelectedType<T>
extensionClass
name, singletons
Constructor and Description |
---|
ExtensionPoint.SelectedType(String name,
Class<T> extensionClass) |
Modifier and Type | Method and Description |
---|---|
String |
bindType(Binder binder,
Settings settings,
String settingsKey,
String defaultValue)
Binds the extension class to the class that is registered for the give configured for the settings key in
the settings object.
|
bindExtensions, getExtension, registerExtension
bind
public String bindType(Binder binder, Settings settings, String settingsKey, String defaultValue)
binder
- the binder to usesettings
- the settings to look up the key to find the implementation to bindsettingsKey
- the key to use with the settingsdefaultValue
- the default value if the settings do not contain the key, or null if there is no defaultCopyright © 2009–2017. All rights reserved.