public interface MetaBean
Modifier and Type | Method and Description |
---|---|
String |
beanName()
Gets the bean name, which is normally the fully qualified class name of the bean.
|
Class<? extends Bean> |
beanType()
Get the type of the bean represented as a
Class . |
BeanBuilder<? extends Bean> |
builder()
Creates a bean builder that can be used to create an instance of this bean.
|
PropertyMap |
createPropertyMap(Bean bean)
Creates a map of properties for the specified bean.
|
<R> MetaProperty<R> |
metaProperty(String propertyName)
Gets a meta-property by name.
|
int |
metaPropertyCount()
Counts the number of properties.
|
boolean |
metaPropertyExists(String propertyName)
Checks if a property exists.
|
Iterable<MetaProperty<?>> |
metaPropertyIterable()
Gets an iterator of meta-properties.
|
Map<String,MetaProperty<?>> |
metaPropertyMap()
Gets the map of meta-properties, keyed by property name.
|
BeanBuilder<? extends Bean> builder()
UnsupportedOperationException
- if the bean cannot be createdPropertyMap createPropertyMap(Bean bean)
bean
- the bean to create the map for, not nullString beanName()
Class<? extends Bean> beanType()
Class
.int metaPropertyCount()
boolean metaPropertyExists(String propertyName)
propertyName
- the property name to check, null returns false<R> MetaProperty<R> metaProperty(String propertyName)
R
- the property type, optional, enabling auto-castingpropertyName
- the property name to retrieve, null throws NoSuchElementExceptionNoSuchElementException
- if the property name is invalidIterable<MetaProperty<?>> metaPropertyIterable()
This method returns an Iterable
, which is simpler than a Map
.
As a result, implementations may be able to optimise, and so this method should be
preferred to metaPropertyMap()
where a choice is possible.
Map<String,MetaProperty<?>> metaPropertyMap()
Where possible, use metaPropertyIterable()
instead.
Copyright © 2007–2013 Joda.org. All rights reserved.