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

com.redhat.ceylon.compiler.java.runtime.tools.JavaRunnerOptions Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.redhat.ceylon.compiler.java.runtime.tools;

import com.redhat.ceylon.common.Backend;
import com.redhat.ceylon.common.config.CeylonConfig;
import com.redhat.ceylon.common.config.DefaultToolOptions;

public class JavaRunnerOptions extends RunnerOptions {
    private ClassLoader delegateClassLoader;

    public ClassLoader getDelegateClassLoader() {
        return delegateClassLoader;
    }

    public void setDelegateClassLoader(ClassLoader delegateClassLoader) {
        this.delegateClassLoader = delegateClassLoader;
    }

    /**
     * Set options according to the configuration settings found in the given
     * CeylonConfig
     * @param config The CeylonConfig to take the settings from
     */
    public void mapOptions(CeylonConfig config) {
        setRun(DefaultToolOptions.getRunToolRun(config, Backend.Java));
    }
    
    /**
     * Create a new JavaRunnerOptions object initialized with the
     * settings read from the default Ceylon configuration
     * @return An initialized JavaRunnerOptions object
     */
    public static JavaRunnerOptions fromConfig() {
        return fromConfig(CeylonConfig.get());
    }

    /**
     * Create a new JavaRunnerOptions object initialized with the
     * settings read from the given configuration
     * @param config The CeylonConfig to take the settings from
     * @return An initialized JavaRunnerOptions object
     */
    public static JavaRunnerOptions fromConfig(CeylonConfig config) {
        JavaRunnerOptions options = new JavaRunnerOptions();
        options.mapOptions(config);
        return options;
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy