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

io.jooby.internal.apt.Source Maven / Gradle / Ivy

There is a newer version: 3.5.3
Show newest version
package ${packageName};
${imports}
@io.jooby.annotation.Generated(${className}.class)
public class ${generatedClassName} implements io.jooby.MvcExtension, io.jooby.MvcFactory<${className}> {
    protected final java.util.function.Function factory;
${constructors}
    public ${generatedClassName}(${className} instance) {
        this(ctx -> instance);
    }

    public ${generatedClassName}(java.util.function.Supplier<${className}> provider) {
        this(ctx -> provider.get());
    }

    public ${generatedClassName}(java.util.function.Function factory) {
        this.factory = factory;
    }

${methods}

    public boolean supports(Class<${className}> type) {
        return type == ${className}.class;
    }

    public io.jooby.Extension create(java.util.function.Supplier<${className}> provider) {
        return new ${generatedClassName}(provider);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy