|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.japaki.beans.AbstractGenericBean.GenericProperty<B,V>
protected static class AbstractGenericBean.GenericProperty<B extends AbstractGenericBean,V>
Property implementation for AbstractGenericBean
based on
getValue
and
setValue
.
Constructor Summary | |
---|---|
AbstractGenericBean.GenericProperty(String name,
int hashCode,
Class<V> type)
Constructs a new generic property. |
Method Summary | ||
---|---|---|
Class<V> |
getType()
Returns the type of this property, that is the return type of the getValue method. |
|
V |
getValue(B bean)
Retrieves the value of this property from the specified bean. |
|
int |
hashCode()
|
|
static
|
newInstance(String name,
int hashCode,
Class<? super V> type)
Constructs a new generic property. |
|
void |
setValue(B bean,
V value)
Stores the value in the property specified by this object in the specified bean. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractGenericBean.GenericProperty(String name, int hashCode, Class<V> type)
name
- name of the property.hashCode
- hashCode of the new property. It can be used to store
properties or the values in a list.type
- the class of the property's values.Method Detail |
---|
public static <B extends AbstractGenericBean,V> AbstractGenericBean.GenericProperty<B,V> newInstance(String name, int hashCode, Class<? super V> type)
name
- name of the property.hashCode
- hashCode of the new property. It can be used to store
properties or the values in a list.type
- the class of the property's values.public V getValue(B bean)
Property
getValue
in interface Property<B extends AbstractGenericBean,V>
bean
- the bean from which to read the value
NullPointerException
- if bean
is null
.
IllegalArgumentException
- if the property is unknown to
the beanpublic void setValue(B bean, V value)
Property
setValue
in interface Property<B extends AbstractGenericBean,V>
bean
- the bean in which to store the valuevalue
- the new value of the property
NullPointerException
- if bean
is null
.
IllegalArgumentException
- if the property is unknown to
the beanpublic Class<V> getType()
Property
getValue
method.
This method is optional.
getType
in interface Property<B extends AbstractGenericBean,V>
null
if not specified.public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |