public interface Resolver extends WithPriority, ConfigurationAware
Any resolver may implement optional interface
Validateable
. The validation is
performed before a MustacheEngine
is built. An
invalid resolver is not put into service, i.e. it's not included in the final
list of resolvers returned by
Configuration.getResolvers()
.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY |
Modifier and Type | Method and Description |
---|---|
default int |
getPriority() |
Object |
resolve(Object contextObject,
String name,
ResolutionContext context)
Resolve the value from specified context object and name.
|
getConfigurationKeys, init
static final int DEFAULT_PRIORITY
Object resolve(Object contextObject, String name, ResolutionContext context)
null
in case of the resolver is not capable
of resolving it.
ResolutionContext
allows to register a callback to release all
the relevant resources after the resolved value is used.
contextObject
- The current context object (aka base object), may be
null
name
- The name (the key or its part) is never null
context
- The current resolution contextnull
Placeholder.NULL
default int getPriority()
getPriority
in interface WithPriority
Copyright © 2017. All rights reserved.