org.joda.beans.impl.direct
Class DirectBean

java.lang.Object
  extended by org.joda.beans.impl.direct.DirectBean
All Implemented Interfaces:
Bean

public abstract class DirectBean
extends Object
implements Bean

A bean implementation designed for use by the code generator.

It used to be mandatory for code generated beans to extend this class. Now, beans can simply implement the Bean interface.


Constructor Summary
DirectBean()
           
 
Method Summary
abstract  DirectBean clone()
           
<R> Property<R>
property(String propertyName)
          Gets a property by name.
 Set<String> propertyNames()
          Gets the set of property names.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.joda.beans.Bean
metaBean
 

Constructor Detail

DirectBean

public DirectBean()
Method Detail

property

public <R> Property<R> property(String propertyName)
Description copied from interface: Bean
Gets a property by name.

The base interface throws an exception if the name is not recognised. By contrast, the DynamicBean subinterface creates the property on demand.

Specified by:
property in interface Bean
Type Parameters:
R - the property type, optional, enabling auto-casting
Parameters:
propertyName - the property name to retrieve, not null
Returns:
the property, not null

propertyNames

public Set<String> propertyNames()
Description copied from interface: Bean
Gets the set of property names.

Specified by:
propertyNames in interface Bean
Returns:
the unmodifiable map of property objects, not null

clone

public abstract DirectBean clone()
Overrides:
clone in class Object


Copyright © 2007–2014 Joda.org. All rights reserved.