public class TransformResolver extends LocaleAwareResolver implements Transformer
Transformer instance or
by the resolver itself.EnhancedResolver.HintconfigurationDEFAULT_PRIORITY| Constructor and Description |
|---|
TransformResolver(int priority,
String... matchNames) |
TransformResolver(int priority,
Transformer transformer,
String... matchingNames) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
matches(Object contextObject,
String name) |
protected boolean |
matches(String name) |
protected String |
matchingName(int index) |
protected Object |
performTransformation(Object contextObject,
String name,
ResolutionContext context) |
Object |
resolve(Object contextObject,
String name,
ResolutionContext context)
Resolve the value from specified context object and name.
|
protected void |
setMatchingNames(String... matchNames) |
Object |
transform(Object contextObject,
String name,
ResolutionContext context) |
getCurrentLocale, initcreateHint, getPriority, toStringcheckNotInitialized, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetConfigurationKeys, initpublic TransformResolver(int priority,
String... matchNames)
priority - matchNames - public TransformResolver(int priority,
Transformer transformer,
String... matchingNames)
priority - transformer - matchingNames - public Object resolve(Object contextObject, String name, ResolutionContext context)
Resolvernull 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.
resolve in interface ResolvercontextObject - The current context object (aka base object), may be
nullname - The name (the key or its part) is never nullcontext - The current resolution contextnullPlaceholder.NULLpublic Object transform(Object contextObject, String name, ResolutionContext context)
transform in interface Transformerprotected boolean matches(Object contextObject, String name)
contextObject - name - true in case of the resolver matches given context
object and name, false otherwiseprotected Object performTransformation(Object contextObject, String name, ResolutionContext context)
contextObject - name - context - null if the
transformation was not successfullprotected boolean matches(String name)
protected String matchingName(int index)
protected void setMatchingNames(String... matchNames)
Copyright © 2017. All rights reserved.