public final class Property
extends java.lang.Object
java.beans.PropertyDescriptor
. The java.beans
package
is not available in a number of environments (e.g. Android, Java ME), so this is
desirable for portability of Spring's core conversion facility.
Used to build a TypeDescriptor from a property location. The built TypeDescriptor can then be used to convert from/to the property type.
TypeDescriptor.TypeDescriptor(Property)
,
TypeDescriptor.nested(Property, int)
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<Property,java.lang.annotation.Annotation[]> |
annotationCache |
private java.lang.annotation.Annotation[] |
annotations |
private MethodParameter |
methodParameter |
private java.lang.String |
name |
private java.lang.Class<?> |
objectType |
private java.lang.reflect.Method |
readMethod |
private java.lang.reflect.Method |
writeMethod |
Constructor and Description |
---|
Property(java.lang.Class<?> objectType,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod) |
Property(java.lang.Class<?> objectType,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private void |
addAnnotationsToMap(java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotationMap,
java.lang.reflect.AnnotatedElement object) |
private java.lang.Class<?> |
declaringClass() |
boolean |
equals(java.lang.Object other) |
(package private) java.lang.annotation.Annotation[] |
getAnnotations() |
private java.lang.reflect.Field |
getField() |
(package private) MethodParameter |
getMethodParameter() |
java.lang.String |
getName()
The name of the property: e.g.
|
java.lang.Class<?> |
getObjectType()
The object declaring this property, either directly or in a superclass the object extends.
|
java.lang.reflect.Method |
getReadMethod()
The property getter method: e.g.
|
java.lang.Class<?> |
getType()
The property type: e.g.
|
java.lang.reflect.Method |
getWriteMethod()
The property setter method: e.g.
|
int |
hashCode() |
private java.lang.annotation.Annotation[] |
resolveAnnotations() |
private MethodParameter |
resolveMethodParameter() |
private java.lang.String |
resolveName() |
private MethodParameter |
resolveParameterType(MethodParameter parameter) |
private MethodParameter |
resolveReadMethodParameter() |
private MethodParameter |
resolveWriteMethodParameter() |
private static java.util.Map<Property,java.lang.annotation.Annotation[]> annotationCache
private final java.lang.Class<?> objectType
private final java.lang.reflect.Method readMethod
private final java.lang.reflect.Method writeMethod
private final java.lang.String name
private final MethodParameter methodParameter
private java.lang.annotation.Annotation[] annotations
public Property(java.lang.Class<?> objectType, java.lang.reflect.Method readMethod, java.lang.reflect.Method writeMethod)
public Property(java.lang.Class<?> objectType, java.lang.reflect.Method readMethod, java.lang.reflect.Method writeMethod, java.lang.String name)
public java.lang.Class<?> getObjectType()
public java.lang.String getName()
public java.lang.Class<?> getType()
java.lang.String
public java.lang.reflect.Method getReadMethod()
getFoo()
public java.lang.reflect.Method getWriteMethod()
setFoo(String)
MethodParameter getMethodParameter()
java.lang.annotation.Annotation[] getAnnotations()
private java.lang.String resolveName()
private MethodParameter resolveMethodParameter()
private MethodParameter resolveReadMethodParameter()
private MethodParameter resolveWriteMethodParameter()
private MethodParameter resolveParameterType(MethodParameter parameter)
private java.lang.annotation.Annotation[] resolveAnnotations()
private void addAnnotationsToMap(java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotationMap, java.lang.reflect.AnnotatedElement object)
private java.lang.reflect.Field getField()
private java.lang.Class<?> declaringClass()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object