S - strategy typeP - provider typepublic abstract class AbstractConfigurableStrategySupport<S,P> extends Object
ProviderFinder. Uses two generic parameters:| Constructor and Description |
|---|
AbstractConfigurableStrategySupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyAll(Map<String,S> source,
Map<String,S> target)
Utility method which copies all entries from source into target.
|
Set<String> |
getAvailableAliases() |
Collection<S> |
getAvailableStrategies() |
protected String |
getConfiguredValue() |
protected Class<P> |
getProviderClass() |
protected ProviderFinder<P> |
getProviderFinder() |
protected abstract Map<String,S> |
getStrategies(P provider) |
protected S |
getStrategyForAlias(String alias)
Override this method if a fallback search is required.
|
protected abstract String |
getStrategyKey() |
protected Properties |
newProperties() |
protected void |
overrideDefaultStrategyMap(Map<String,S> map)
Invoked after the the map of strategies is built from providers.
|
void |
setProperties(Properties props) |
protected S getStrategyForAlias(String alias)
alias - of the strategy to use.protected final String getConfiguredValue()
public final Set<String> getAvailableAliases()
public final Collection<S> getAvailableStrategies()
protected void overrideDefaultStrategyMap(Map<String,S> map)
map - the built map.protected final void copyAll(Map<String,S> source, Map<String,S> target)
Map.putAll(Map), but it doesn't require
changing generics to construction like
extends String, ? extends S>
source - the map from where the entries will be copied into target.target - the map where to put entries from source.protected Properties newProperties()
Properties used to lookup namingStrategy alias.public final void setProperties(Properties props)
props - Properties containing configured alias.protected ProviderFinder<P> getProviderFinder()
ProviderFinder used to find all strategies.protected Class<P> getProviderClass()
ParameterizedType to compute the class. Override it to
support anonymous classes which do not play well with ParameterizedType's.protected abstract Map<String,S> getStrategies(P provider)
provider - the instance responsible for strategy lookup.protected abstract String getStrategyKey()
Copyright © 2008-2014. All Rights Reserved.