Package com.axelor.text
Class StringTemplates
java.lang.Object
com.axelor.text.StringTemplates
- All Implemented Interfaces:
Templates
The implementation of
Templates
for the StringTemplate (ST4) support.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a newTemplate
instance from the given template file.Create a newTemplate
instance from the given reader.Create a newTemplate
instance from the given template text.withLocale
(Locale locale)
-
Constructor Details
-
StringTemplates
public StringTemplates() -
StringTemplates
public StringTemplates(char delimiterStartChar, char delimiterStopChar)
-
-
Method Details
-
withLocale
-
fromText
Description copied from interface:Templates
Create a newTemplate
instance from the given template text. -
from
Description copied from interface:Templates
Create a newTemplate
instance from the given template file.- Specified by:
from
in interfaceTemplates
- Parameters:
file
- the template file- Returns:
- an instance of
Template
- Throws:
IOException
- if file read throwsIOException
-
from
Description copied from interface:Templates
Create a newTemplate
instance from the given reader.- Specified by:
from
in interfaceTemplates
- Parameters:
reader
- theReader
to read the template- Returns:
- an instance of
Template
- Throws:
IOException
- if reader throwsIOException
-