Interface AnnotatedConfigurable<C,​D>

  • Type Parameters:
    C - The class type that provides context at runtime.
    D - The class type that provides context while editing.
    All Superinterfaces:
    Configurable<C,​D>

    public interface AnnotatedConfigurable<C,​D>
    extends Configurable<C,​D>
    Author:
    hylke
    • Method Detail

      • configure

        default void configure​(com.google.gson.JsonElement config,
                               C context,
                               D edtCtx,
                               ConfigEditor<?> configEditor)
                        throws ConfigurationException
        Configure the instance using the given configuration.
        Specified by:
        configure in interface Configurable<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 - optional ConfigEditor that may be used to access and assign configured contents.
        Throws:
        ConfigurationException - If the configuration can not be loaded.
      • getConfigEditor

        default ConfigEditor<?> getConfigEditor​(C context,
                                                D edtCtx)
        Returns 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:
        getConfigEditor in interface Configurable<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.
        Throws:
        IllegalStateException - always