- 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 ofBeanPropertyMetadataextendingPropertyMetadataType.- 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()voidmakeReadOnly(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:
getExpressionin interfacePropertyMetadata<V>- Overrides:
getExpressionin classAbstractPropertyMetadata<V>- Returns:
- the optional
Supplierthat calculates thevaluedynamically. May benullfor a regular property. If it is notnullthe property will automatically beread-only. You should not provide an explicitvalidatorif you provide an expression.
-
makeReadOnly
public void makeReadOnly(V value)
- Specified by:
makeReadOnlyin interfaceBeanPropertyMetadata<V>- Parameters:
value- the fixed value to set asexpressionto make the property read-only.
-
withValidator
public PropertyMetadata<V> withValidator(Validator<? super V> validator)
- Specified by:
withValidatorin interfacePropertyMetadata<V>- Parameters:
validator- the newValidator.- Returns:
- a new instance of
PropertyMetadatawith the givenValidatorused forPropertyMetadata.getValidator().
-
-