Package com.axelor.text
Class StringTemplates
- java.lang.Object
-
- com.axelor.text.StringTemplates
-
-
Constructor Summary
Constructors Constructor Description StringTemplates()StringTemplates(char delimiterStartChar, char delimiterStopChar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Templatefrom(File file)Create a newTemplateinstance from the given template file.Templatefrom(Reader reader)Create a newTemplateinstance from the given reader.TemplatefromText(String text)Create a newTemplateinstance from the given template text.StringTemplateswithLocale(Locale locale)
-
-
-
Method Detail
-
withLocale
public StringTemplates withLocale(Locale locale)
-
fromText
public Template fromText(String text)
Description copied from interface:TemplatesCreate a newTemplateinstance from the given template text.
-
from
public Template from(File file) throws IOException
Description copied from interface:TemplatesCreate a newTemplateinstance from the given template file.- Specified by:
fromin interfaceTemplates- Parameters:
file- the template file- Returns:
- an instance of
Template - Throws:
IOException- if file read throwsIOException
-
from
public Template from(Reader reader) throws IOException
Description copied from interface:TemplatesCreate a newTemplateinstance from the given reader.- Specified by:
fromin interfaceTemplates- Parameters:
reader- theReaderto read the template- Returns:
- an instance of
Template - Throws:
IOException- if reader throwsIOException
-
-