Interface ConfigurableFactory


  • public interface ConfigurableFactory
    The interface that context classes can implement to indicate they are a factory for classes.
    Author:
    scf
    • Method Detail

      • instantiate

        Object instantiate​(String className,
                           com.google.gson.JsonElement config,
                           Object runtimeContext,
                           Object editContext)
                    throws ConfigurationException
        Create an instance of the given class.
        Parameters:
        className - The name of the class to instantiate.
        config - The configuration of the class.
        runtimeContext - The runtime context for the instance.
        editContext - The edit context for the instance.
        Returns:
        an instance of the given class
        Throws:
        ConfigurationException - if there is a problem instantiating the class.
      • instantiate

        default <T> T instantiate​(Class<? extends T> clazz,
                                  com.google.gson.JsonElement config,
                                  Object runtimeContext,
                                  Object editContext)
                           throws ConfigurationException
        Create an instance of the given class.
        Type Parameters:
        T - The class type.
        Parameters:
        clazz - The class to instantiate.
        config - The configuration of the class.
        runtimeContext - The runtime context for the instance.
        editContext - The edit context for the instance.
        Returns:
        an instance of the given class
        Throws:
        ConfigurationException - if there is a problem instantiating the class.