public interface Bean
The implementation may be any class, but is typically a standard JavaBean with get/set methods. Alternate implementations might store the properties in another data structure such as a map.
| Modifier and Type | Method and Description |
|---|---|
MetaBean |
metaBean()
Gets the meta-bean representing the parts of the bean that are
common across all instances, such as the set of meta-properties.
|
default <R> Property<R> |
property(String propertyName)
Gets a property by name.
|
default Set<String> |
propertyNames()
Gets the set of property names.
|
MetaBean metaBean()
The meta-bean can be thought of as the equivalent of Class but for beans.
default <R> Property<R> property(String propertyName)
Each bean consists of a known set of properties. This method checks whether there is a property with the specified name.
The base interface throws an exception if the name is not recognised.
By contrast, the DynamicBean subinterface creates the property on demand.
R - the property type, optional, enabling auto-castingpropertyName - the property name to retrieve, not nullNoSuchElementException - if the property name is invalidCopyright © 2007–2017 Joda.org. All rights reserved.