public class PropertyModel extends Object implements PropertyOps
| Modifier and Type | Field and Description |
|---|---|
protected java.util.function.Function<Class<?>,Object> |
annotationFinder |
protected org.springframework.core.convert.ConversionService |
conversionService |
protected java.util.function.Function<Object,?> |
getter |
protected String |
name |
protected Method |
readMethod |
protected java.util.function.BiConsumer<Object,Object> |
setter |
protected Class<?> |
type |
protected Method |
writeMethod |
| Constructor and Description |
|---|
PropertyModel() |
PropertyModel(String name,
Class<?> clazz,
java.util.function.Function<Object,?> getter,
java.util.function.BiConsumer<Object,Object> setter,
org.springframework.core.convert.ConversionService conversionService,
java.util.function.Function<Class<?>,Object> annotationFinder) |
| Modifier and Type | Method and Description |
|---|---|
<A> A |
findAnnotation(Class<A> annotationClass) |
java.util.function.Function<Class<?>,Object> |
getAnnotationFinder() |
java.util.function.Function<Object,?> |
getGetter() |
String |
getName() |
Method |
getReadMethod() |
java.util.function.BiConsumer<Object,?> |
getSetter() |
Class<?> |
getType() |
Object |
getValue(Object entity) |
Method |
getWriteMethod()
If applicable, returns the write method associated with this property.
|
boolean |
isReadable() |
boolean |
isWritable() |
void |
setAnnotationFinder(java.util.function.Function<Class<?>,Object> annotationFinder) |
void |
setGetter(java.util.function.Function<Object,?> getter) |
void |
setReadMethod(Method readMethod) |
void |
setSetter(java.util.function.BiConsumer<Object,Object> setter) |
void |
setType(Class<?> type) |
void |
setValue(Object entity,
Object value) |
void |
setWriteMethod(Method writeMethod) |
String |
toString() |
protected String name
protected Class<?> type
protected java.util.function.Function<Object,?> getter
protected java.util.function.BiConsumer<Object,Object> setter
protected java.util.function.Function<Class<?>,Object> annotationFinder
protected Method readMethod
protected Method writeMethod
protected org.springframework.core.convert.ConversionService conversionService
public PropertyModel()
public PropertyModel(String name, Class<?> clazz, java.util.function.Function<Object,?> getter, java.util.function.BiConsumer<Object,Object> setter, org.springframework.core.convert.ConversionService conversionService, java.util.function.Function<Class<?>,Object> annotationFinder)
public String getName()
getName in interface PropertyOpspublic Class<?> getType()
getType in interface PropertyOpspublic java.util.function.Function<Object,?> getGetter()
public void setGetter(java.util.function.Function<Object,?> getter)
public java.util.function.BiConsumer<Object,?> getSetter()
public void setSetter(java.util.function.BiConsumer<Object,Object> setter)
public Object getValue(Object entity)
getValue in interface PropertyOpspublic void setValue(Object entity, Object value)
setValue in interface PropertyOpspublic boolean isWritable()
isWritable in interface PropertyOpspublic boolean isReadable()
isReadable in interface PropertyOpspublic Method getReadMethod()
getReadMethod in interface PropertyOpspublic void setReadMethod(Method readMethod)
public Method getWriteMethod()
PropertyOpsgetWriteMethod in interface PropertyOpspublic void setWriteMethod(Method writeMethod)
public <A> A findAnnotation(Class<A> annotationClass)
findAnnotation in interface PropertyOpspublic java.util.function.Function<Class<?>,Object> getAnnotationFinder()
public void setAnnotationFinder(java.util.function.Function<Class<?>,Object> annotationFinder)
public void setType(Class<?> type)
Copyright © 2017. All rights reserved.