io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine Maven / Gradle / Ivy
The newest version!
package io.vertx.mutiny.ext.web.templ.mvel;
import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;
/**
* A template engine that uses the Handlebars library.
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.templ.mvel.MVELTemplateEngine original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.templ.mvel.MVELTemplateEngine.class)
public class MVELTemplateEngine extends io.vertx.mutiny.ext.web.common.template.TemplateEngine {
public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new MVELTemplateEngine((io.vertx.ext.web.templ.mvel.MVELTemplateEngine) obj),
MVELTemplateEngine::getDelegate
);
private final io.vertx.ext.web.templ.mvel.MVELTemplateEngine delegate;
public MVELTemplateEngine(io.vertx.ext.web.templ.mvel.MVELTemplateEngine delegate) {
super(delegate);
this.delegate = delegate;
}
public MVELTemplateEngine(Object delegate) {
super((io.vertx.ext.web.templ.mvel.MVELTemplateEngine)delegate);
this.delegate = (io.vertx.ext.web.templ.mvel.MVELTemplateEngine)delegate;
}
/**
* Empty constructor used by CDI, do not use this constructor directly.
**/
MVELTemplateEngine() {
super(null);
this.delegate = null;
}
public io.vertx.ext.web.templ.mvel.MVELTemplateEngine getDelegate() {
return delegate;
}
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MVELTemplateEngine that = (MVELTemplateEngine) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
/**
* @param vertx
* @return the engine
*/
public static io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine create(io.vertx.mutiny.core.Vertx vertx) {
io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine ret = io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine.newInstance((io.vertx.ext.web.templ.mvel.MVELTemplateEngine)io.vertx.ext.web.templ.mvel.MVELTemplateEngine.create(vertx.getDelegate()));
return ret;
}
/**
* @param vertx
* @param extension
* @return the engine
*/
public static io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine create(io.vertx.mutiny.core.Vertx vertx, String extension) {
io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine ret = io.vertx.mutiny.ext.web.templ.mvel.MVELTemplateEngine.newInstance((io.vertx.ext.web.templ.mvel.MVELTemplateEngine)io.vertx.ext.web.templ.mvel.MVELTemplateEngine.create(vertx.getDelegate(), extension));
return ret;
}
/**
* Default template extension
*/
public static final String DEFAULT_TEMPLATE_EXTENSION = io.vertx.ext.web.templ.mvel.MVELTemplateEngine.DEFAULT_TEMPLATE_EXTENSION;
public static MVELTemplateEngine newInstance(io.vertx.ext.web.templ.mvel.MVELTemplateEngine arg) {
return arg != null ? new MVELTemplateEngine(arg) : null;
}
}