类 FieldSetter<E>
- java.lang.Object
-
- tech.firas.framework.bean.FieldAccessor
-
- tech.firas.framework.bean.FieldSetter<E>
-
public class FieldSetter<E> extends FieldAccessor
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classFieldSetter.Configuration
-
字段概要
-
从类继承的字段 tech.firas.framework.bean.FieldAccessor
field
-
-
构造器概要
构造器 构造器 说明 FieldSetter(Class<? super E> destClass, Field field, FieldSetter.Configuration configuration)Construct a FieldSetter to get a field in `destClass` The `field` may be declared in a base class of `destClass`
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Class<?>getParameterType()voidset(E obj, Object value)Set the field value of the Java bean `obj` to `value`-
从类继承的方法 tech.firas.framework.bean.FieldAccessor
equals, hashCode
-
-
-
-
构造器详细资料
-
FieldSetter
public FieldSetter(Class<? super E> destClass, Field field, FieldSetter.Configuration configuration) throws NoSuchMethodException
Construct a FieldSetter to get a field in `destClass` The `field` may be declared in a base class of `destClass`- 参数:
destClass- the type of the Java bean whose field is to be writtenfield- the field to be writtenconfiguration- specifies how to set the field value- 抛出:
NoSuchMethodException- if the configuration does not allow directly access to the field but there is no public setter of the field
-
-
方法详细资料
-
getParameterType
public Class<?> getParameterType()
- 返回:
- the type of the field value that this setter accepts
-
set
public void set(E obj, Object value) throws InvocationTargetException, IllegalAccessException
Set the field value of the Java bean `obj` to `value`- 参数:
obj- the Java bean to setvalue- 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 setter
-
-