Package org.joda.beans.impl
Class BasicImmutableBeanBuilder<T extends Bean>
- java.lang.Object
-
- org.joda.beans.impl.BasicImmutableBeanBuilder<T>
-
- Type Parameters:
T- the bean type
- All Implemented Interfaces:
BeanBuilder<T>
public abstract class BasicImmutableBeanBuilder<T extends Bean> extends Object implements BeanBuilder<T>
Basic implementation ofBeanBuilderthat wraps aMetaBean.The subclass implementation generally has concrete fields for each property. This class has effectively been replaced by
DirectFieldsBeanBuilder. It is retained for situations where the builder is being implemented manually.
-
-
Constructor Summary
Constructors Constructor Description BasicImmutableBeanBuilder(MetaBean meta)Constructs the builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(String propertyName)Gets the value of a single property previously added to the builder.<P> Pget(MetaProperty<P> metaProperty)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.StringtoString()Returns a string that summarises the builder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.joda.beans.BeanBuilder
build, set
-
-
-
-
Constructor Detail
-
BasicImmutableBeanBuilder
public BasicImmutableBeanBuilder(MetaBean meta)
Constructs the builder.- Parameters:
meta- the meta-bean, not null
-
-
Method Detail
-
get
public Object get(String propertyName)
Description copied from interface:BeanBuilderGets the value of a single property previously added to the builder.- Specified by:
getin interfaceBeanBuilder<T extends Bean>- Parameters:
propertyName- the property name to query, not null- Returns:
- the previously set value, null if none
-
get
public <P> P get(MetaProperty<P> metaProperty)
Description copied from interface:BeanBuilderGets the value of a single property previously added to the builder.- Specified by:
getin interfaceBeanBuilder<T extends Bean>- Type Parameters:
P- the type of the property.- Parameters:
metaProperty- the meta-property to query, not null- Returns:
- the previously set value, null if none
-
set
public BeanBuilder<T> set(MetaProperty<?> metaProperty, Object value)
Description copied from interface:BeanBuilderSets the value of a single property into the builder.This will normally behave as per a
Map, however it may not and as a general rule callers should only set each property once.- Specified by:
setin interfaceBeanBuilder<T extends Bean>- Parameters:
metaProperty- the meta-property to set, not nullvalue- the property value, may be null- Returns:
this, for chaining, not null
-
-