T
- the expected type of the propertypublic interface PropertyReaderContext<T>
Modifier and Type | Method and Description |
---|---|
T |
getValue()
Returns the value of the specified property.
|
ClassPropertyReaderContext<T> |
instantiate()
Returns a context which allows to specify how the implementation type represented by the given property should be
instantiated.
|
PropertyReaderContext<T> |
required()
Marks the given property as required.
|
PropertyReaderContext<T> |
withDefault(T defaultValue)
Sets a default value in case no value is specified for the given property.
|
PropertyReaderContext<T> |
withValidator(PropertyValidator<T> validator)
Adds a validator used to validate the value of the given property.
|
PropertyReaderContext<T> withDefault(T defaultValue)
defaultValue
- the default value used when non is specifiedPropertyReaderContext<T> required()
PropertyReaderContext<T> withValidator(PropertyValidator<T> validator)
validator
- the validator to use for the value of the propertyClassPropertyReaderContext<T> instantiate()
T getValue()
null
in case the property is not present in the given
configuration map and no default implementation has been specifiedHibernateException
- If the property is marked as required but is not present or if one of the registered
PropertyValidator
s detects an invalid valueCopyright © 2010-2017 Red Hat, Inc., Emmanuel Bernard and various contributors. All Rights Reserved.