public class MapProxy extends Object implements Map<Object,Object>, OptNullBasicTypeFromObjectGetter<Object>, InvocationHandler, Serializable
限定符和类型 | 方法和说明 |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static MapProxy |
create(Map<?,?> map)
创建代理Map
此类对Map做一次包装,提供各种getXXX方法 |
Set<Map.Entry<Object,Object>> |
entrySet() |
Object |
get(Object key) |
Object |
getObj(Object key,
Object defaultValue)
获取Object属性值
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
boolean |
isEmpty() |
Set<Object> |
keySet() |
Object |
put(Object key,
Object value) |
void |
putAll(Map<?,?> m) |
Object |
remove(Object key) |
int |
size() |
<T> T |
toProxyBean(Class<T> interfaceClass)
将Map代理为指定接口的动态代理对象
|
Collection<Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
getBigDecimal, getBigInteger, getBool, getByte, getChar, getDate, getDouble, getEnum, getFloat, getInt, getLong, getShort, getStr
getBigDecimal, getBigInteger, getBool, getByte, getChar, getDate, getDouble, getEnum, getFloat, getInt, getLong, getObj, getShort, getStr
public MapProxy(Map<?,?> map)
map
- 被代理的Mappublic static MapProxy create(Map<?,?> map)
map
- 被代理的MapMapProxy
public Object getObj(Object key, Object defaultValue)
OptBasicTypeGetter
getObj
在接口中 OptBasicTypeGetter<Object>
key
- 属性名defaultValue
- 默认值public boolean containsKey(Object key)
containsKey
在接口中 Map<Object,Object>
public boolean containsValue(Object value)
containsValue
在接口中 Map<Object,Object>
public Object invoke(Object proxy, Method method, Object[] args)
invoke
在接口中 InvocationHandler
public <T> T toProxyBean(Class<T> interfaceClass)
T
- 代理的Bean类型interfaceClass
- 接口Copyright © 2021. All rights reserved.