T
- The type of resolvers for which strings should be resolved.public class ToStringResolverManager<T extends Resolver>
extends java.lang.Object
ToStringResolver
and allows resolving any
resolvers of some type to strings.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY |
Modifier | Constructor and Description |
---|---|
protected |
ToStringResolverManager(java.lang.Class<T> resolverClass) |
Modifier and Type | Method and Description |
---|---|
void |
addToStringResolver(ToStringResolver resolver)
Adds a single value string resolver.
|
java.util.List<java.lang.Integer> |
getOrderedPriorityLevels() |
int |
getPriority(ToStringResolver resolver) |
java.util.Collection<ToStringResolver> |
getToStringResolvers() |
void |
removeToStringResolver(ToStringResolver resolver) |
java.util.Map<T,java.lang.String> |
resolveAllToStrings(Resolver rootResolver)
Utility method to call
resolveAllToStrings(Set) with a single root resolver instance. |
java.util.Map<T,java.lang.String> |
resolveAllToStrings(java.util.Set<Resolver> rootResolvers)
Resolves all possible value strings, starting at the given set of root resolvers.
|
java.util.Map<T,java.lang.String> |
resolveToStringsAtPriority(Resolver rootResolver,
int priority)
Utility method to call
resolveToStringsAtPriority(Set, int) with a single root resolver instance. |
java.util.Map<T,java.lang.String> |
resolveToStringsAtPriority(java.util.Set<Resolver> rootResolvers,
int priority)
Resolves all possible value strings, starting at the given set of root resolvers.
|
public static final int DEFAULT_PRIORITY
protected ToStringResolverManager(java.lang.Class<T> resolverClass)
public java.util.Collection<ToStringResolver> getToStringResolvers()
public void removeToStringResolver(ToStringResolver resolver)
public int getPriority(ToStringResolver resolver)
public void addToStringResolver(ToStringResolver resolver)
resolver
- The ToStringResolver
object to add.public java.util.List<java.lang.Integer> getOrderedPriorityLevels()
public java.util.Map<T,java.lang.String> resolveToStringsAtPriority(java.util.Set<Resolver> rootResolvers, int priority)
ToStringResolver.getApplicableResolvers(Set)
for all managed ToStringResolver instances, and apply those
ToStringResolver instances to the returned set of resolvers. Resolves only for the ToStringResolver instances which
are mapped to the given priority level.rootResolvers
- The root resolvers, at which to begin resolving.priority
- The priority level of which to take the resolvers. See getOrderedPriorityLevels()
for an ordered list of the available priority levels.public java.util.Map<T,java.lang.String> resolveToStringsAtPriority(Resolver rootResolver, int priority)
resolveToStringsAtPriority(Set, int)
with a single root resolver instance.public java.util.Map<T,java.lang.String> resolveAllToStrings(java.util.Set<Resolver> rootResolvers)
ToStringResolver.getApplicableResolvers(Set)
for all managed ToStringResolver instances, and apply those
ToStringResolver instances to the returned set of resolvers.rootResolvers
- The root resolvers, at which to begin resolving.public java.util.Map<T,java.lang.String> resolveAllToStrings(Resolver rootResolver)
resolveAllToStrings(Set)
with a single root resolver instance.