Interface Property<V>
- 
- Type Parameters:
- V- the type of the properties value
 - All Known Subinterfaces:
- MethodProperty<V>
 
 public interface Property<V>A representation of a JavaBean style property- See Also:
- Properties
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description AnnotatedElementgetAnnotatedElement()Get the element responsible for retrieving the property valueTypegetBaseType()Returns the property typeClass<?>getDeclaringClass()Returns the class that declares the propertyClass<V>getJavaClass()Returns the property typeMembergetMember()Get the member responsible for retrieving the property valueStringgetName()Returns the name of the property.VgetValue(Object instance)Returns the property value for the specified bean.booleanisAnnotationPresent(Class<? extends Annotation> annotation)Indicates whether the givenannotationis defined for this property.booleanisReadOnly()Indicates whether this is a read-only propertyvoidsetAccessible()Calls the setAccessible method on the underlying member(s).voidsetValue(Object instance, V value)This method sets the property value for a specified bean to the specified value.
 
- 
- 
- 
Method Detail- 
getNameString getName() Returns the name of the property. If the property is a field, then the field name is returned. Otherwise, if the property is a method, then the name that is returned is the getter method name without the "get" or "is" prefix, and a lower case first letter.- Returns:
- The name of the property
 
 - 
getBaseTypeType getBaseType() Returns the property type- Returns:
- The property type
 
 - 
getAnnotatedElementAnnotatedElement getAnnotatedElement() Get the element responsible for retrieving the property value- Returns:
 
 - 
getMemberMember getMember() Get the member responsible for retrieving the property value- Returns:
 
 - 
getValueV getValue(Object instance) Returns the property value for the specified bean. The property to be returned is either a field or getter method.- Parameters:
- bean- The bean to read the property from
- Returns:
- The property value
- Throws:
- ClassCastException- if the value is not of the type V
 
 - 
setValuevoid setValue(Object instance, V value) This method sets the property value for a specified bean to the specified value. The property to be set is either a field or setter method.- Parameters:
- bean- The bean containing the property to set
- value- The new property value
 
 - 
getDeclaringClassClass<?> getDeclaringClass() Returns the class that declares the property- Returns:
 
 - 
isReadOnlyboolean isReadOnly() Indicates whether this is a read-only property- Returns:
 
 - 
setAccessiblevoid setAccessible() Calls the setAccessible method on the underlying member(s). The operation should be performed within aPrivilegedAction
 - 
isAnnotationPresentboolean isAnnotationPresent(Class<? extends Annotation> annotation) Indicates whether the givenannotationis defined for this property. This method will consider the annotations present in both field and accessor method.- Parameters:
- annotation- The Annotation to check.
- Returns:
- True if the annotation is defined. Otherwise is false.
 
 
- 
 
-