Polish Property class
This commit is contained in:
parent
fac060f0af
commit
6e0400db32
|
|
@ -37,6 +37,7 @@ import org.springframework.util.StringUtils;
|
||||||
* The built TypeDescriptor can then be used to convert from/to the property type.
|
* The built TypeDescriptor can then be used to convert from/to the property type.
|
||||||
*
|
*
|
||||||
* @author Keith Donald
|
* @author Keith Donald
|
||||||
|
* @author Phillip Webb
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
* @see TypeDescriptor#TypeDescriptor(Property)
|
* @see TypeDescriptor#TypeDescriptor(Property)
|
||||||
* @see TypeDescriptor#nested(Property, int)
|
* @see TypeDescriptor#nested(Property, int)
|
||||||
|
|
@ -53,8 +54,7 @@ public final class Property {
|
||||||
|
|
||||||
private final MethodParameter methodParameter;
|
private final MethodParameter methodParameter;
|
||||||
|
|
||||||
private final Annotation[] annotations;
|
private Annotation[] annotations;
|
||||||
|
|
||||||
|
|
||||||
public Property(Class<?> objectType, Method readMethod, Method writeMethod) {
|
public Property(Class<?> objectType, Method readMethod, Method writeMethod) {
|
||||||
this(objectType, readMethod, writeMethod, null);
|
this(objectType, readMethod, writeMethod, null);
|
||||||
|
|
@ -65,13 +65,7 @@ public final class Property {
|
||||||
this.readMethod = readMethod;
|
this.readMethod = readMethod;
|
||||||
this.writeMethod = writeMethod;
|
this.writeMethod = writeMethod;
|
||||||
this.methodParameter = resolveMethodParameter();
|
this.methodParameter = resolveMethodParameter();
|
||||||
if (name != null) {
|
this.name = (name == null ? resolveName() : name);
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.name = resolveName();
|
|
||||||
}
|
|
||||||
this.annotations = resolveAnnotations();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue