- java.lang.Object
-
- io.github.mmm.property.AbstractPropertyMetadata<V>
-
- io.github.mmm.bean.impl.BeanPropertyMetadataSimple<V>
-
- Type Parameters:
V
- type of theproperty value
.
- All Implemented Interfaces:
BeanPropertyMetadata<V>
,PropertyMetadata<V>
public class BeanPropertyMetadataSimple<V> extends AbstractPropertyMetadata<V> implements BeanPropertyMetadata<V>
Implementation ofBeanPropertyMetadata
extendingPropertyMetadataType
.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description BeanPropertyMetadataSimple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Supplier<? extends V>
getExpression()
void
makeReadOnly(V value)
PropertyMetadata<V>
withValidator(Validator<? super V> validator)
-
Methods inherited from class io.github.mmm.property.AbstractPropertyMetadata
asMap, get, getKeyCount, getKeys, getValidator, getValueType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.property.PropertyMetadata
asMap, get, get, get, getKeyCount, getKeys, getMarshalling, getValidator, getValueType, hasKeys, isTransient
-
-
-
-
Method Detail
-
getExpression
public Supplier<? extends V> getExpression()
- Specified by:
getExpression
in interfacePropertyMetadata<V>
- Overrides:
getExpression
in classAbstractPropertyMetadata<V>
- Returns:
- the optional
Supplier
that calculates thevalue
dynamically. May benull
for a regular property. If it is notnull
the property will automatically beread-only
. You should not provide an explicitvalidator
if you provide an expression.
-
makeReadOnly
public void makeReadOnly(V value)
- Specified by:
makeReadOnly
in interfaceBeanPropertyMetadata<V>
- Parameters:
value
- the fixed value to set asexpression
to make the property read-only.
-
withValidator
public PropertyMetadata<V> withValidator(Validator<? super V> validator)
- Specified by:
withValidator
in interfacePropertyMetadata<V>
- Parameters:
validator
- the newValidator
.- Returns:
- a new instance of
PropertyMetadata
with the givenValidator
used forPropertyMetadata.getValidator()
.
-
-