public class BeanDictionaryMap extends LinkedHashMap<String,Object>
In general, this approach for defining dictionary names for classes is used when it's not possible to use the
@Bean.typeName()
annotation.
Subclasses must implement a public no-arg constructor so that it can be instantiated by the bean context code.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier | Constructor and Description |
---|---|
protected |
BeanDictionaryMap()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected BeanDictionaryMap |
addClass(String typeName,
Class<?> c)
Add a dictionary name mapping for the specified class.
|
protected BeanDictionaryMap |
addCollectionClass(String typeName,
Class<? extends Collection> collectionClass,
Object entryClass)
Add a dictionary name mapping for the specified collection class with the specified entry class.
|
protected BeanDictionaryMap |
addMapClass(String typeName,
Class<? extends Map> mapClass,
Object keyClass,
Object valueClass)
Add a dictionary name mapping for the specified map class with the specified key and value classes.
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
protected BeanDictionaryMap()
protected BeanDictionaryMap addClass(String typeName, Class<?> c)
typeName
- The dictionary name of the class.c
- The class represented by the dictionary name.protected BeanDictionaryMap addMapClass(String typeName, Class<? extends Map> mapClass, Object keyClass, Object valueClass)
typeName
- The dictionary name of the class.mapClass
- The map implementation class.keyClass
- The key class.valueClass
- The value class.protected BeanDictionaryMap addCollectionClass(String typeName, Class<? extends Collection> collectionClass, Object entryClass)
typeName
- The dictionary name of the class.collectionClass
- The collection implementation class.entryClass
- The entry class.Copyright © 2018 Apache. All rights reserved.