Class AbstractConfigurable<C,D>
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.configurable.AbstractConfigurable<C,D>
-
- Type Parameters:
C- The class type that provides context at runtime.D- The class type that provides context while editing.
- All Implemented Interfaces:
Configurable<C,D>
public abstract class AbstractConfigurable<C,D> extends Object implements Configurable<C,D>
- Author:
- hylke
-
-
Field Summary
-
Fields inherited from interface de.fraunhofer.iosb.ilt.configurable.Configurable
CLASS_CONFIG_EDITOR_FACTORY_METHOD_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractConfigurable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(com.google.gson.JsonElement config, C context, D edtCtx, ConfigEditor<?> configEditor)Configure the instance using the given configuration.EditorMap<?>getConfigEditor(C context, D edtCtx)Returns an editor for this class.
-
-
-
Method Detail
-
configure
public void configure(com.google.gson.JsonElement config, C context, D edtCtx, ConfigEditor<?> configEditor) throws ConfigurationExceptionDescription copied from interface:ConfigurableConfigure the instance using the given configuration.- Specified by:
configurein interfaceConfigurable<C,D>- Parameters:
config- The configuration to use for this instance.context- the object that defines the context at runtime.edtCtx- the object that defines the context while editing.configEditor- optionalConfigEditorthat may be used to access and assign configured contents.- Throws:
ConfigurationException- If the configuration can not be loaded.
-
getConfigEditor
public EditorMap<?> getConfigEditor(C context, D edtCtx)
Description copied from interface:ConfigurableReturns an editor for this class. Changing the configuration of this editor may change the configuration of the instance that generated the editor, but it is not guaranteed to do so.- Specified by:
getConfigEditorin interfaceConfigurable<C,D>- Parameters:
context- the object that defines the context at runtime.edtCtx- the object that defines the context while editing.- Returns:
- A generic editor for any instance of this class.
-
-