public class CachingIsNewStrategyFactory extends Object implements IsNewStrategyFactory
IsNewStrategyFactory
that caches resolved IsNewStrategy
instances per type to avoid re-resolving them
on each and every request.Constructor and Description |
---|
CachingIsNewStrategyFactory(IsNewStrategyFactory delegate)
Creates a new
CachingIsNewStrategyFactory delegating to the given IsNewStrategyFactory . |
Modifier and Type | Method and Description |
---|---|
IsNewStrategy |
getIsNewStrategy(Class<?> type)
Returns the
IsNewStrategy to be used for the given type. |
public CachingIsNewStrategyFactory(IsNewStrategyFactory delegate)
CachingIsNewStrategyFactory
delegating to the given IsNewStrategyFactory
.delegate
- must not be null.public IsNewStrategy getIsNewStrategy(Class<?> type)
IsNewStrategyFactory
IsNewStrategy
to be used for the given type.getIsNewStrategy
in interface IsNewStrategyFactory
type
- must not be null.IsNewStrategy
to be used for the given type, will never be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.