MetaBeanpublic interface DynamicMetaBean extends MetaBean
DynamicBean.
A dynamic bean can have properties added or removed at any time. As such, there is a different meta-bean for each dynamic bean. The meta-bean allows meta-properties to be created on demand.
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Class<? extends DynamicBean> |
beanType() |
Get the type of the bean represented as a
Class. |
BeanBuilder<? extends DynamicBean> |
builder() |
Creates a bean builder that can be used to create an instance of this bean.
|
<R> MetaProperty<R> |
metaProperty(java.lang.String propertyName) |
Gets a meta-property by name.
|
void |
metaPropertyDefine(java.lang.String propertyName,
java.lang.Class<?> propertyType) |
Defines a property for the bean.
|
void |
metaPropertyRemove(java.lang.String propertyName) |
Removes a property by name.
|
annotation, annotations, beanName, isBuildable, metaPropertyCount, metaPropertyExists, metaPropertyIterable, metaPropertyMap, of, registerBeanBuilder<? extends DynamicBean> builder()
All properties added to the builder will be created and appear in the result.
java.lang.Class<? extends DynamicBean> beanType()
Class.<R> MetaProperty<R> metaProperty(java.lang.String propertyName)
This will not throw an exception if the meta-property name does not exist. Whether a meta-property is immediately created or not is implementation dependent.
metaProperty in interface MetaBeanR - the property type, optional, enabling auto-castingpropertyName - the property name to retrieve, not nullvoid metaPropertyDefine(java.lang.String propertyName,
java.lang.Class<?> propertyType)
Some implementations will automatically add properties, in which case this method will have no effect.
propertyName - the property name to check, not empty, not nullpropertyType - the property type, not nullvoid metaPropertyRemove(java.lang.String propertyName)
propertyName - the property name to remove, null ignoredCopyright © 2007–2018 Joda.org. All rights reserved.