类 PropertyAccessor
java.lang.Object
cn.taketoday.reflect.PropertyAccessor
- 所有已实现的接口:
GetterMethod,SetterMethod
- 直接已知子类:
GetterSetterPropertyAccessor,MethodAccessorPropertyAccessor,ReadOnlyPropertyAccessor,ReflectivePropertyAccessor,WriteOnlyPropertyAccessor
- 作者:
- TODAY 2020/9/11 11:06
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static PropertyAccessorstatic PropertyAccessorPropertyAccessorstatic PropertyAccessorstatic PropertyAccessorfromMethod(GetterMethod readMethod, SetterMethod writeMethod) use GetterMethod and SetterMethod tech to access propertystatic PropertyAccessorfromMethod(Method readMethod, Method writeMethod) getter setter is exists in a bean or pojo, use fast invoke techMethodInvokerstatic PropertyAccessorfromReflective(Field field) use java reflectFieldtechstatic PropertyAccessorfromReflective(Field field, Method readMethod, Method writeMethod) use java reflectFieldtechabstract ObjectGet property fromobjprivate static PropertyAccessorgetPropertyAccessor(MethodInvoker accessor, Field field, Method readMethod) private static PropertyAccessorgetPropertyAccessor(Field field, MethodInvoker accessor, Method writeMethod) booleanread-only ?abstract voidset property从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.reflect.GetterMethod
getReadMethod从接口继承的方法 cn.taketoday.reflect.SetterMethod
getWriteMethod
-
构造器详细资料
-
PropertyAccessor
public PropertyAccessor()
-
-
方法详细资料
-
get
从接口复制的说明:GetterMethodGet property fromobj- 指定者:
get在接口中GetterMethod- 参数:
obj- Target object- 返回:
- Property
-
set
从接口复制的说明:SetterMethodset propertyIf value is null and target property type is primitive this method will do nothing.
- 指定者:
set在接口中SetterMethod- 参数:
obj- Target objvalue- property value
-
isReadOnly
public boolean isReadOnly()read-only ?- 从以下版本开始:
- 4.0
-
fromField
PropertyAccessor- 参数:
field- Field- 返回:
- PropertyAccessor
-
from
- 抛出:
ReflectionException- No property in target class
-
fromMethod
public static PropertyAccessor fromMethod(@Nullable Method readMethod, @Nullable Method writeMethod) getter setter is exists in a bean or pojo, use fast invoke techMethodInvoker- 参数:
writeMethod- setter methodreadMethod- getter method- 返回:
- PropertyAccessor
-
fromMethod
public static PropertyAccessor fromMethod(GetterMethod readMethod, @Nullable SetterMethod writeMethod) use GetterMethod and SetterMethod tech to access property- 参数:
writeMethod- setter methodreadMethod- getter method- 返回:
- PropertyAccessor
-
fromField
public static PropertyAccessor fromField(Field field, @Nullable Method readMethod, @Nullable Method writeMethod) - 参数:
field- Field- 返回:
- PropertyAccessor
- 抛出:
NullPointerException- field is null
-
getPropertyAccessor
private static PropertyAccessor getPropertyAccessor(Field field, MethodInvoker accessor, @NonNull Method writeMethod) -
getPropertyAccessor
private static PropertyAccessor getPropertyAccessor(MethodInvoker accessor, Field field, @NonNull Method readMethod) -
fromReflective
use java reflectFieldtech- 参数:
field- Field- 返回:
- Reflective PropertyAccessor
- 另请参阅:
-
fromReflective
public static PropertyAccessor fromReflective(@Nullable Field field, @Nullable Method readMethod, @Nullable Method writeMethod) use java reflectFieldtech- 参数:
field- Field- 返回:
- Reflective PropertyAccessor
- 另请参阅:
-