Class DefaultExternalValueFactory

  • All Implemented Interfaces:
    IExternalValueFactory

    public class DefaultExternalValueFactory
    extends java.lang.Object
    implements IExternalValueFactory
    Default interpreter factory with framework support and other basic features. This class provides run-time support only. It creates and destroys certain types based on load and unload
    • Constructor Detail

      • DefaultExternalValueFactory

        public DefaultExternalValueFactory​(java.io.File workingDirectory,
                                           java.io.InputStream config)
                                    throws java.io.IOException,
                                           java.lang.NoSuchMethodException,
                                           java.lang.IllegalAccessException,
                                           java.lang.reflect.InvocationTargetException,
                                           java.lang.InstantiationException
        Throws:
        java.io.IOException
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        java.lang.InstantiationException
    • Method Detail

      • create

        public com.spencerwi.either.Either<java.lang.Exception,​Value> create​(java.lang.String loaderName,
                                                                                   java.util.List<Value> args)
        Description copied from interface: IExternalValueFactory
        Creates a new interpreter value for the specified type using the supplied arguments
        Specified by:
        create in interface IExternalValueFactory
        Parameters:
        loaderName - the type to create
        args - the arguments used to create the value
        Returns:
        the value or an exception if creation fails
      • destroy

        public Value destroy​(Value value)
        Description copied from interface: IExternalValueFactory
        Destruction of values created by the factory. Destruction must make sure all resources hold by this value is freed
        Specified by:
        destroy in interface IExternalValueFactory
        Parameters:
        value - the value to destroy
        Returns:
        void return