All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.permazen.cli.jshell.PermazenExecutionControlProvider Maven / Gradle / Ivy

The newest version!

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package io.permazen.cli.jshell;

import io.permazen.util.ApplicationClassLoader;

import org.dellroad.jct.jshell.LocalContextExecutionControlProvider;
import org.dellroad.jct.jshell.MemoryLoaderDelegate;
import org.dellroad.stuff.java.MemoryClassLoader;

/**
 * A {@link LocalContextExecutionControlProvider} that creates {@link PermazenExecutionControl}'s.
 */
public class PermazenExecutionControlProvider extends LocalContextExecutionControlProvider {

    public static final String NAME = "permazen";

    @Override
    public String name() {
        return NAME;
    }

    @Override
    protected PermazenExecutionControl createLocalExecutionControl(MemoryLoaderDelegate delegate) {
        return new PermazenExecutionControl(delegate);
    }

    @Override
    protected MemoryClassLoader createMemoryClassLoader() {
        return new MemoryClassLoader(ApplicationClassLoader.getInstance());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy