public class MapProxy extends Object implements Map<Object,Object>, TypeGetter<Object>, InvocationHandler, Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
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() |
static MapProxy |
of(Map<?,?> map)
创建代理Map
此类对Map做一次包装,提供各种getXXX方法 |
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, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllget, get, get, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBool, getBool, getByte, getByte, getBytes, getBytes, getChar, getChar, getDate, getDate, getDouble, getDouble, getEnum, getEnum, getFloat, getFloat, getInt, getInt, getLocalDate, getLocalDate, getLocalDateTime, getLocalDateTime, getLocalTime, getLocalTime, getLong, getLong, getNumber, getNumber, getObj, getShort, getShort, getSqlTime, getSqlTime, getSqlTimestamp, getSqlTimestamp, getStr, getStrpublic MapProxy(Map<?,?> map)
map - 被代理的Mappublic static MapProxy of(Map<?,?> map)
map - 被代理的MapMapProxypublic Object getObj(Object key, Object defaultValue)
TypeGettergetObj in interface TypeGetter<Object>key - 属性名defaultValue - 默认值public boolean containsKey(Object key)
containsKey in interface Map<Object,Object>public boolean containsValue(Object value)
containsValue in interface Map<Object,Object>public Object invoke(Object proxy, Method method, Object[] args)
invoke in interface InvocationHandlerpublic <T> T toProxyBean(Class<T> interfaceClass)
T - 代理的Bean类型interfaceClass - 接口Copyright © 2025. All rights reserved.