本文整理汇总了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;
}