|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joda.beans.impl.direct.DirectBean
public abstract class DirectBean
A bean implementation designed for use by the code generator.
This implementation uses direct access via propertyGet(String, boolean) and
propertySet(String, Object, boolean) to avoid reflection.
For code generation, the bean must directly extend this class and have a no-arguments constructor.
| Constructor Summary | |
|---|---|
DirectBean()
|
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
|
|
int |
hashCode()
|
|
|
property(String propertyName)
Gets a property by name. |
|
protected Object |
propertyGet(String propertyName,
boolean quiet)
Gets the value of the property. |
|
Set<String> |
propertyNames()
Gets the set of property names. |
|
protected void |
propertySet(String propertyName,
Object value,
boolean quiet)
Sets the value of the property. |
|
String |
toString()
|
|
protected void |
validate()
Validates the values of the properties. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.joda.beans.Bean |
|---|
metaBean |
| Constructor Detail |
|---|
public DirectBean()
| Method Detail |
|---|
public <R> Property<R> property(String propertyName)
Bean
property in interface BeanR - the property type, optional, enabling auto-castingpropertyName - the property name to retrieve, null throws NoSuchElementException
public Set<String> propertyNames()
Bean
propertyNames in interface Bean
protected Object propertyGet(String propertyName,
boolean quiet)
propertyName - the property name, not nullquiet - true to return null if unable to read
NoSuchElementException - if the property name is invalid
protected void propertySet(String propertyName,
Object value,
boolean quiet)
propertyName - the property name, not nullvalue - the value of the property, may be nullquiet - true to take no action if unable to write
NoSuchElementException - if the property name is invalidprotected void validate()
RuntimeException - if a property is invalidpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||