org.jeecgframework.poi.util
类 PoiReflectorUtil

java.lang.Object
  继承者 org.jeecgframework.poi.util.PoiReflectorUtil

public final class PoiReflectorUtil
extends Object

反射工具类,缓存读取的class信息,省的一直获取

作者:
JueYue 参考的 mybatis的Reflector

方法摘要
static PoiReflectorUtil forClass(Class<?> clazz)
           
static PoiReflectorUtil fromCache(Class<?> clazz)
           
 List<Field> getFieldList()
           
 Method getGetMethod(String propertyName)
           
 Map<String,Method> getGetMethods()
           
 Method getSetMethod(String propertyName)
           
 Object getValue(Object obj, String property)
          获取field 值
 boolean setValue(Object obj, String property, Object object)
          设置field值
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

forClass

public static PoiReflectorUtil forClass(Class<?> clazz)

fromCache

public static PoiReflectorUtil fromCache(Class<?> clazz)

getGetMethod

public Method getGetMethod(String propertyName)

getSetMethod

public Method getSetMethod(String propertyName)

getValue

public Object getValue(Object obj,
                       String property)
获取field 值

参数:
obj -
property -
返回:

setValue

public boolean setValue(Object obj,
                        String property,
                        Object object)
设置field值

参数:
obj - 对象
property -
object - 属性值
返回:

getGetMethods

public Map<String,Method> getGetMethods()

getFieldList

public List<Field> getFieldList()


Copyright © 2015. All Rights Reserved.