Package io.github.erdos.stencil
Class TemplateVariables
java.lang.Object
io.github.erdos.stencil.TemplateVariables
Holds information about variables found in template file. Can be used to validate template data.
 
 A variable path looks like the following.
 A.B.C[].D
 
A path is a string that contains tokens separated with . (dot) characters. The tokens represents keys in maps.
- 
Method SummaryModifier and TypeMethodDescriptionstatic TemplateVariablesfromPaths(Collection<String> allVariablePaths, Collection<String> allFragmentNames) Returns all variable paths as an immutable set.voidthrowWhenInvalid(TemplateData templateData) Throws IllegalArgumentException exception when template data is missing values for schema.
- 
Method Details- 
fromPathspublic static TemplateVariables fromPaths(Collection<String> allVariablePaths, Collection<String> allFragmentNames) 
- 
getAllVariablesReturns all variable paths as an immutable set.
- 
getAllFragmentNames
- 
throwWhenInvalidThrows IllegalArgumentException exception when template data is missing values for schema.Throws when referred keys are missing from data. - Throws:
- IllegalArgumentException- then parameter does not match pattern
- NullPointerException- when parameter is null.
 
 
-