Package org.openstreetmap.josm.tools.template_engine
Provides classes for a generic template engine used in presets, name rendering and search function.
-
Interface Summary Interface Description TemplateEngineDataProvider Interface for objects that can be used with a template to generate a string.TemplateEntry Interface for one node in the abstract syntax tree that is the result of parsing a template string withTemplateParser
. -
Class Summary Class Description CompoundTemplateEntry TemplateEntry
that concatenates several templates.Condition TemplateEntry
that applies other templates based on conditions.ContextSwitchTemplate The context switch offers possibility to use tags of referenced primitive when constructing primitive name.ContextSwitchTemplate.AndSet ContextSwitchTemplate.ChildSet ContextSwitchTemplate.ContextProvider ContextSwitchTemplate.OrSet ContextSwitchTemplate.ParentSet SearchExpressionCondition ConditionalTemplateEntry
that executes another template in case a search expression applies to the given data provider.StaticText TemplateEntry
representing a static string.TemplateParser Template parser.Tokenizer This class converts a template string (stream of characters) into a stream of tokens.Tokenizer.Token Variable TemplateEntry
that inserts the value of a variable. -
Enum Summary Enum Description Tokenizer.TokenType -
Exception Summary Exception Description ParseError Exception thrown in case of an error during template parsing.