Create a new Template. @param value of the template. @param allowUnresolved if unresolved expressions should remain. @param encode all values. @param encodeSlash if slash characters should be encoded.
(
String value,
ExpansionOptions allowUnresolved,
EncodingOptions encode,
boolean encodeSlash,
Charset charset)
| 50 | * @param encodeSlash if slash characters should be encoded. |
| 51 | */ |
| 52 | Template( |
| 53 | String value, |
| 54 | ExpansionOptions allowUnresolved, |
| 55 | EncodingOptions encode, |
| 56 | boolean encodeSlash, |
| 57 | Charset charset) { |
| 58 | if (value == null) { |
| 59 | throw new IllegalArgumentException("template is required."); |
| 60 | } |
| 61 | this.template = value; |
| 62 | this.allowUnresolved = ExpansionOptions.ALLOW_UNRESOLVED == allowUnresolved; |
| 63 | this.encode = encode; |
| 64 | this.encodeSlash = encodeSlash; |
| 65 | this.charset = charset; |
| 66 | this.parseTemplate(); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Create a new Template from the provided {@link TemplateChunk}s. |
nothing calls this directly
no test coverage detected