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

io.swagger.codegen.mustache.UppercaseLambda Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
package io.swagger.codegen.mustache;

import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Template;

import java.io.IOException;
import java.io.Writer;

/**
 * Converts text in a fragment to uppercase.
 *
 * Register:
 * 
 * additionalProperties.put("uppercase", new UppercaseLambda());
 * 
* * Use: *
 * {{#uppercase}}{{summary}}{{/uppercase}}
 * 
*/ public class UppercaseLambda implements Mustache.Lambda { @Override public void execute(Template.Fragment fragment, Writer writer) throws IOException { String text = fragment.execute(); writer.write(text.toUpperCase()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy