|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.japaki.beans.AbstractGenericBean<B>
public abstract class AbstractGenericBean<B extends GenericBean<B>>
Since a "normal" bean would require a new class for each of its
properties, a generic bean provides a getValue and a
setValue method to access all its properties with an
instance of GenericProperty.
A public default constructor is expected.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractGenericBean.GenericProperty<B extends AbstractGenericBean,V>
Property implementation for AbstractGenericBean based on
getValue and
setValue. |
| Constructor Summary | |
|---|---|
AbstractGenericBean()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
abstract List<Property<? super B,?>> |
getProperties()
Return a list of all properties of this bean. |
protected abstract Object |
getValue(Property property)
Implementation of the getValue
method of all properties of this bean. |
int |
hashCode()
|
protected abstract void |
setValue(Property property,
Object value)
Implementation of the setValue
method of all properties of this bean. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractGenericBean()
| Method Detail |
|---|
protected abstract Object getValue(Property property)
getValue
method of all properties of this bean.
This method should not be called directly,
use AbstractGenericBean.GenericProperty.getValue(B) instead.
IllegalArgumentException - if the property does not belong to
this bean
protected abstract void setValue(Property property,
Object value)
setValue
method of all properties of this bean.
This method should not be called directly,
use AbstractGenericBean.GenericProperty.setValue(B, V) instead.
IllegalArgumentException - if the property does not belong to
this beanpublic abstract List<Property<? super B,?>> getProperties()
GenericBean
getProperties in interface GenericBean<B extends GenericBean<B>>public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals 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 | ||||||||