Class PropertyMapping<T>
java.lang.Object
org.tentackle.reflect.PropertyMapping<T>
- Type Parameters:
T- the type of the bean providing the property
- Direct Known Subclasses:
FxPropertyMapping
Describes the mapping of a property.
Properties can be either is/set-pairs or get/set-pairs of methods or some other readonly method.
Properties can be either is/set-pairs or get/set-pairs of methods or some other readonly method.
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyMapping(String name, Method getter, Method setter) Creates a property mapping. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the property value.Gets the getter.getName()Gets the name of the property.Gets the setter.Class<?> Gets the type of the value held by the property.inthashCode()booleanReturns whether the property is readonly.voidSets the property value.
The value will be converted to the type of the property, if necessary.toString()
-
Constructor Details
-
PropertyMapping
-
-
Method Details
-
getName
-
getGetter
-
getSetter
-
isReadOnly
public boolean isReadOnly()Returns whether the property is readonly.- Returns:
- true if readonly
-
getValueType
Gets the type of the value held by the property.- Returns:
- the value type
-
get
-
set
Sets the property value.
The value will be converted to the type of the property, if necessary.Throws a
ImmutableExceptionif property is readonly.
Throws aIllegalArgumentExceptionif value cannot be converted to the type of the property.- Parameters:
object- the object containing the propertyvalue- the value
-
equals
-
hashCode
-
toString
-