T - the type of the beanpublic interface BeanBuilder<T extends Bean>
This interface allows a bean to be created even if it is immutable.
| Modifier and Type | Method and Description |
|---|---|
T |
build()
Builds the bean from the state of the builder.
|
<P> P |
get(MetaProperty<P> metaProperty)
Gets the value of a single property previously added to the builder.
|
Object |
get(String propertyName)
Gets the value of a single property previously added to the builder.
|
BeanBuilder<T> |
set(MetaProperty<?> metaProperty,
Object value)
Sets the value of a single property into the builder.
|
BeanBuilder<T> |
set(String propertyName,
Object value)
Sets the value of a single property into the builder.
|
Object get(String propertyName)
propertyName - the property name to query, not nullRuntimeException - thrown if the property name is invalid<P> P get(MetaProperty<P> metaProperty)
P - the type of the property.metaProperty - the meta-property to query, not nullRuntimeException - thrown if the property is invalidBeanBuilder<T> set(String propertyName, Object value)
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
propertyName - the property name to set, not nullvalue - the property value, may be nullthis, for chaining, not nullRuntimeException - optionally thrown if the property name is invalidBeanBuilder<T> set(MetaProperty<?> metaProperty, Object value)
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
metaProperty - the meta-property to set, not nullvalue - the property value, may be nullthis, for chaining, not nullRuntimeException - optionally thrown if the property is invalidT build()
Once this method has been called, the builder is in an invalid state. The effect of further method calls is undetermined.
Copyright © 2007–2017 Joda.org. All rights reserved.