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

io.quarkus.qute.runtime.QuteRecorder Maven / Gradle / Ivy

package io.quarkus.qute.runtime;

import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

import io.quarkus.runtime.annotations.Recorder;

@Recorder
public class QuteRecorder {

    public Supplier createContext(List resolverClasses,
            List templatePaths, List tags, Map> variants) {
        return new Supplier() {

            @Override
            public Object get() {
                return new QuteContext() {

                    @Override
                    public List getTemplatePaths() {
                        return templatePaths;
                    }

                    @Override
                    public List getTags() {
                        return tags;
                    }

                    @Override
                    public List getResolverClasses() {
                        return resolverClasses;
                    }

                    @Override
                    public Map> getVariants() {
                        return variants;
                    }
                };
            }
        };
    }

    public interface QuteContext {

        List getResolverClasses();

        List getTemplatePaths();

        List getTags();

        Map> getVariants();
    }

}