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

org.cthul.quarkus.dynamicmessages.StringTemplateLocation Maven / Gradle / Ivy

The newest version!
package org.cthul.quarkus.dynamicmessages;

import io.quarkus.qute.TemplateLocator;
import io.quarkus.qute.Variant;

import java.io.Reader;
import java.io.StringReader;
import java.util.Optional;

public record StringTemplateLocation(String value, Variant varian) implements TemplateLocator.TemplateLocation {

    public StringTemplateLocation(String value) {
        this(value, null);
    }

    @Override
    public Reader read() {
        return new StringReader(value);
    }

    @Override
    public Optional getVariant() {
        return Optional.ofNullable(varian);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy