本文整理匯總了Java中org.springframework.util.CachingMapDecorator類的典型用法代碼示例。如果您正苦於以下問題:Java CachingMapDecorator類的具體用法?Java CachingMapDecorator怎麽用?Java CachingMapDecorator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CachingMapDecorator類屬於org.springframework.util包,在下文中一共展示了CachingMapDecorator類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getButtonManager
import org.springframework.util.CachingMapDecorator; //導入依賴的package包/類
/**
* Returns the {@link CommandFaceButtonManager} for the given
* faceDescriptorId.
*
* @param faceDescriptorId id of the {@link CommandFaceDescriptor}.
* @return the {@link CommandFaceButtonManager} managing buttons configured
* with the {@link CommandFaceDescriptor}.
*/
private CommandFaceButtonManager getButtonManager(String faceDescriptorId) {
if (this.faceButtonManagers == null) {
this.faceButtonManagers = new CachingMapDecorator() {
protected Object create(Object key) {
return new CommandFaceButtonManager(AbstractCommand.this, (String) key);
}
};
}
CommandFaceButtonManager m = (CommandFaceButtonManager) this.faceButtonManagers.get(faceDescriptorId);
return m;
}