Package com.twelvemonkeys.util
Class BeanMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
A
Map adapter for a Java Bean.
Ruthlessly stolen from Binkley's Blog
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate classprivate classprivate static interfaceNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringentrySet()private static Set<PropertyDescriptor> initDescriptors(Object pBean) private Objectintsize()private static Objectunwrap(BeanMap.Wrapped wrapped) Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
bean
-
descriptors
-
-
Constructor Details
-
BeanMap
- Throws:
IntrospectionException
-
-
Method Details
-
initDescriptors
- Throws:
IntrospectionException
-
entrySet
-
get
-
put
-
remove
-
size
public int size() -
checkKey
-
readResolve
- Throws:
IntrospectionException
-
unwrap
-