public abstract class OptionsCollector extends java.lang.Object implements ModuleDefinition, DeclaringModuleType, RegistryAwareModuleDefinition
ModuleDefinition
that, instead of directly providing option definitions, will collect option definitions from yet other ModuleDefinition
s.
To use this:
OptionsCollector
implementing the abstract classes as usual. Overwrite getImplementationClass()
, getProperties()
, testDependencies()
as neccessary
ModuleDefinition
s that should provide options for this collector return the OptionsCollector
subclass itself on ModuleDefinition.getModuleType()
(OptionCollectors are a ModuleDefinition AND a ModuleType!)
getOptionDefinitions()
that are returned by your "special type" module definitionsConstructor and Description |
---|
OptionsCollector() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Returns some longer description of the module type and it's purpose
|
java.lang.Class<? extends java.lang.Object> |
getImplementationBaseClass()
Declares a base class for all implementation classes of this module type.
|
java.lang.Class<? extends java.lang.Object> |
getImplementationClass()
Returns the implementation class of the module
|
OptionDefinitionsMap |
getOptionDefinitions()
Returns the map of option definitions
|
java.lang.Object |
getProperties()
Returns a custom properties object or null
|
java.lang.Class<? extends java.lang.Object> |
getPropertyClass()
Returns the type of the property object that needs to be returned by
ModuleDefinition.getProperties() . |
java.lang.String |
getTitle()
Returns some descriptive title of the module typew
|
void |
injectRegistry(ModuleRegistry registry) |
boolean |
isKeyBased()
Declares if modules of this type need to be key based, therefor need to implement the
KeyBasedModuleDefinition . |
boolean |
isPropertiesNeeded()
Declares if module definitions of this type need to declare a property object to be returned by
ModuleDefinition.getProperties() |
boolean |
isSelfRegistered()
Declares if module definitions of this type typically should register their definition class as implementation class.
|
void |
testDependencies()
May test for dependencies that need to be met for this module to work.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getModuleType, getTitle
public boolean isKeyBased()
DeclaringModuleType
KeyBasedModuleDefinition
.
Types returning false here still may optionally implement this interface.isKeyBased
in interface DeclaringModuleType
public boolean isSelfRegistered()
DeclaringModuleType
isSelfRegistered
in interface DeclaringModuleType
public java.lang.Class<? extends java.lang.Object> getImplementationBaseClass()
DeclaringModuleType
getImplementationBaseClass
in interface DeclaringModuleType
public boolean isPropertiesNeeded()
DeclaringModuleType
ModuleDefinition.getProperties()
isPropertiesNeeded
in interface DeclaringModuleType
public java.lang.Class<? extends java.lang.Object> getPropertyClass()
DeclaringModuleType
ModuleDefinition.getProperties()
. Return null to declare no property class.getPropertyClass
in interface DeclaringModuleType
public java.lang.Class<? extends java.lang.Object> getImplementationClass()
ModuleDefinition
getImplementationClass
in interface ModuleDefinition
public OptionDefinitionsMap getOptionDefinitions()
ModuleDefinition
getOptionDefinitions
in interface ModuleDefinition
public java.lang.Object getProperties()
ModuleDefinition
getProperties
in interface ModuleDefinition
public void testDependencies() throws ModuleDependencyException
ModuleDefinition
testDependencies
in interface ModuleDefinition
ModuleDependencyException
- If a dependency is not metpublic void injectRegistry(ModuleRegistry registry)
injectRegistry
in interface RegistryAwareModuleDefinition
public java.lang.String getTitle()
ModuleType
getTitle
in interface ModuleType
public java.lang.String getDescription()
ModuleType
getDescription
in interface ModuleType