Class BeanDictionaryMap
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<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.
Example:
Subclasses must implement a public no-arg constructor so that it can be instantiated by the bean context code.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected BeanDictionaryMap
Add a dictionary name mapping for the specified class.protected BeanDictionaryMap
append
(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
Add a dictionary name mapping for the specified map class with the specified key and value classes.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
BeanDictionaryMap
protected BeanDictionaryMap()Constructor.
-
-
Method Details
-
append
Add a dictionary name mapping for the specified class.- Parameters:
typeName
- The dictionary name of the class.c
- The class represented by the dictionary name.- Returns:
- This object.
-
append
protected BeanDictionaryMap append(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.- Parameters:
typeName
- The dictionary name of the class.mapClass
- The map implementation class.keyClass
- The key class.valueClass
- The value class.- Returns:
- This object.
-
append
protected BeanDictionaryMap append(String typeName, Class<? extends Collection> collectionClass, Object entryClass) Add a dictionary name mapping for the specified collection class with the specified entry class.- Parameters:
typeName
- The dictionary name of the class.collectionClass
- The collection implementation class.entryClass
- The entry class.- Returns:
- This object.
-