Package ch.grengine.code.groovy

Examples of ch.grengine.code.groovy.DefaultGroovyCompilerFactory


   
    private static Builder builderFromCompilerConfiguration(final CompilerConfiguration config) {
        if (config == null) {
            throw new IllegalArgumentException("Compiler configuration is null.");
        }
        CompilerFactory compilerFactory = new DefaultGroovyCompilerFactory(config);
        TopCodeCacheFactory topCodeCacheFactory = new DefaultTopCodeCacheFactory(compilerFactory);
        Engine engine = new LayeredEngine.Builder().setTopCodeCacheFactory(topCodeCacheFactory).build();
        return new Builder().setEngine(engine);
    }
View Full Code Here


            throw new IllegalArgumentException("Directory is null.");
        }
        if (dirMode == null) {
            throw new IllegalArgumentException("Dir mode is null.");
        }
        CompilerFactory compilerFactory = new DefaultGroovyCompilerFactory(config);
        TopCodeCacheFactory topCodeCacheFactory = new DefaultTopCodeCacheFactory(compilerFactory);
        Engine engine = new LayeredEngine.Builder().setTopCodeCacheFactory(topCodeCacheFactory).build();
        Sources sources = new DirBasedSources.Builder(dir)
                .setCompilerFactory(compilerFactory)
                .setDirMode(dirMode)
View Full Code Here

            throw new IllegalArgumentException("Compiler configuration is null.");
        }
        if (urls == null) {
            throw new IllegalArgumentException("URL collection is null.");
        }
        CompilerFactory compilerFactory = new DefaultGroovyCompilerFactory(config);
        TopCodeCacheFactory topCodeCacheFactory = new DefaultTopCodeCacheFactory(compilerFactory);
        Engine engine = new LayeredEngine.Builder().setTopCodeCacheFactory(topCodeCacheFactory).build();
        SourceFactory sourceFactory = new DefaultSourceFactory.Builder().setTrackUrlContent(true).build();
        Set<Source> sourceSet = SourceUtil.urlsToSourceSet(sourceFactory, urls);
        Sources sources = new FixedSetSources.Builder(sourceSet)
View Full Code Here

        }
       
        private Builder commit() {
            if (!isCommitted) {
                if (compilerFactory == null) {
                    compilerFactory = new DefaultGroovyCompilerFactory();
                }
                isCommitted = true;
            }
            return this;
        }
View Full Code Here

        }
       
        private Builder commit() {
            if (!isCommitted) {
                if (compilerFactory == null) {
                    compilerFactory = new DefaultGroovyCompilerFactory();
                }
                isCommitted = true;
            }
            return this;
        }
View Full Code Here

                }
                if (name == null) {
                    name = SourceUtil.toCanonicalOrAbsoluteFile(dir).getPath();
                }
                if (compilerFactory == null) {
                    compilerFactory = new DefaultGroovyCompilerFactory();
                }
                if (sourceFactory == null) {
                    sourceFactory = new DefaultSourceFactory();
                }
                if (latencyMs < 0) {
View Full Code Here

            if (!isCommitted) {
                if (name == null) {
                    name = UUID.randomUUID().toString();
                }
                if (compilerFactory == null) {
                    compilerFactory = new DefaultGroovyCompilerFactory();
                }
                if (latencyMs < 0) {
                    latencyMs = DEFAULT_LATENCY_MS;
                }
                isCommitted = true;
View Full Code Here

            if (!isCommitted) {
                if (name == null) {
                    name = UUID.randomUUID().toString();
                }
                if (compilerFactory == null) {
                    compilerFactory = new DefaultGroovyCompilerFactory();
                }
                if (latencyMs < 0) {
                    latencyMs = DEFAULT_LATENCY_MS;
                }
                isCommitted = true;
View Full Code Here

     * @throws IllegalArgumentException if the source is null
     *
     * @since 1.0
     */
    public static Sources sourceToSources(final Source source) {
        return sourceToSources(source, new DefaultGroovyCompilerFactory());
    }
View Full Code Here

     * @throws IllegalArgumentException if the source set or the name is null
     *
     * @since 1.0
     */
    public static Sources sourceSetToSources(final Set<Source> sourceSet, final String name) {
        return sourceSetToSources(sourceSet, name, new DefaultGroovyCompilerFactory());
    }
View Full Code Here

TOP

Related Classes of ch.grengine.code.groovy.DefaultGroovyCompilerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.