public static final class ExtensionPoint.ClassSet<T> extends ExtensionPoint
ExtensionPoint.ClassMap<T>, ExtensionPoint.ClassSet<T>, ExtensionPoint.InstanceMap<K,V>, ExtensionPoint.SelectedType<T>
Modifier and Type | Field and Description |
---|---|
protected Class<T> |
extensionClass |
name, singletons
Constructor and Description |
---|
ExtensionPoint.ClassSet(String name,
Class<T> extensionClass,
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(Class<? extends T> extension)
Registers a new extension
|
bind
public ExtensionPoint.ClassSet(String name, Class<T> extensionClass, Class<?>... singletons)
ExtensionPoint.ClassSet
name
- the human readable underscore case name of the extension poing. This is used in error messages etc.extensionClass
- the base class that should be extendedsingletons
- a list of singletons to bind with this extension point - these are bound in ExtensionPoint.bind(Binder)
public final void registerExtension(Class<? extends T> extension)
extension
- the extension to registerIllegalArgumentException
- iff the class is already registeredprotected final void bindExtensions(Binder binder)
ExtensionPoint
bindExtensions
in class ExtensionPoint
Copyright © 2009–2017. All rights reserved.