类 BeanMap
A
Map-based view of a JavaBean. The default set of keys is the
union of all property names (getters or setters). An attempt to set a
read-only property will be ignored, and write-only properties will be
returned as null. Removal of objects is not a supported (the key
set is fixed).- 作者:
- Chris Nokleberg
- 另请参阅:
-
cn.taketoday.beans.support.BeanMapping
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
字段概要
字段修饰符和类型字段说明protected Objectstatic final intLimit the properties reflected in the key set of the map to readable properties.static final intLimit the properties reflected in the key set of the map to writable properties. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) static BeanMapHelper method to create a newBeanMap.entrySet()booleanabstract ObjectGet the property of a bean.getBean()Return the bean currently in use by this map.abstract ClassgetPropertyType(String name) Get the type of a property.inthashCode()booleanisEmpty()abstract BeanMapnewInstance(Object bean) Create a newBeanMapinstance using the specified bean.abstract ObjectSet the property of a bean.voidvoidChange the underlying bean this map should use.intsize()values()从类继承的方法 java.util.AbstractMap
clone, keySet, toString从接口继承的方法 java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll
-
字段详细资料
-
REQUIRE_GETTER
public static final int REQUIRE_GETTERLimit the properties reflected in the key set of the map to readable properties. -
REQUIRE_SETTER
public static final int REQUIRE_SETTERLimit the properties reflected in the key set of the map to writable properties. -
bean
-
-
构造器详细资料
-
BeanMap
protected BeanMap() -
BeanMap
-
-
方法详细资料
-
create
Helper method to create a newBeanMap. For finer control over the generated instance, use a new instance ofBeanMap.Generatorinstead of this static method.- 参数:
bean- the JavaBean underlying the map- 返回:
- a new
BeanMapinstance
-
newInstance
Create a newBeanMapinstance using the specified bean. This is faster than using thecreate(java.lang.Object)static method.- 参数:
bean- the JavaBean underlying the map- 返回:
- a new
BeanMapinstance
-
getPropertyType
Get the type of a property.- 参数:
name- the name of the JavaBean property- 返回:
- the type of the property, or null if the property does not exist
-
get
-
put
-
get
Get the property of a bean. This allows aBeanMapto be used statically for multiple beans--the bean instance tied to the map is ignored and the bean passed to this method is used instead.- 参数:
bean- the bean to query; must be compatible with the type of thisBeanMapkey- must be a String- 返回:
- the current value, or null if there is no matching property
-
put
Set the property of a bean. This allows aBeanMapto be used statically for multiple beans--the bean instance tied to the map is ignored and the bean passed to this method is used instead.- 参数:
key- must be a String- 返回:
- the old value, if there was one, or null
-
setBean
Change the underlying bean this map should use.- 参数:
bean- the new JavaBean- 另请参阅:
-
getBean
Return the bean currently in use by this map.- 返回:
- the current JavaBean
- 另请参阅:
-
clear
public void clear() -
containsKey
- 指定者:
containsKey在接口中Map<String,Object> - 覆盖:
containsKey在类中AbstractMap<String,Object>
-
containsValue
- 指定者:
containsValue在接口中Map<String,Object> - 覆盖:
containsValue在类中AbstractMap<String,Object>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
remove
-
putAll
-
equals
-
hashCode
public int hashCode() -
entrySet
-
values
-