类 FieldGetter<T>
- java.lang.Object
-
- tech.firas.framework.bean.FieldAccessor
-
- tech.firas.framework.bean.FieldGetter<T>
-
public class FieldGetter<T> extends FieldAccessor
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classFieldGetter.Configuration
-
字段概要
-
从类继承的字段 tech.firas.framework.bean.FieldAccessor
field
-
-
构造器概要
构造器 构造器 说明 FieldGetter(Class<? super T> srcClass, Field field, FieldGetter.Configuration configuration)Construct a FieldGetter to get a field in `srcClass` The `field` may be declared in a base class of `srcClass`
-
-
-
构造器详细资料
-
FieldGetter
public FieldGetter(Class<? super T> srcClass, Field field, FieldGetter.Configuration configuration) throws NoSuchMethodException
Construct a FieldGetter to get a field in `srcClass` The `field` may be declared in a base class of `srcClass`- 参数:
srcClass- the type of the Java bean whose field is to be readfield- the field to be readconfiguration- specifies how to get the field value- 抛出:
NoSuchMethodException- if the configuration does not allow directly access to the field but there is no public getter of the field
-
-
方法详细资料
-
getReturnType
public Class<?> getReturnType()
- 返回:
- the type of the value got from this getter
-
get
public Object get(T obj) throws IllegalAccessException, InvocationTargetException
Get the field value of the Java bean `obj`- 参数:
obj- the Java bean to set- 返回:
- the value of the field
- 抛出:
InvocationTargetException- if it fails to set the value of the field in `obj`IllegalAccessException- if it fails to access the field / its getter
-
-