|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.japaki.beans.TransformProperty<B,S,V>
public class TransformProperty<B,S,V>
A property that transforms a value after reading it from the bean.
Method Summary | ||
---|---|---|
Class<V> |
getType()
Returns null . |
|
V |
getValue(B bean)
Retrieves the value of this property from the specified bean and transforms it with the underlying transformer. |
|
static
|
newInstance(Property<B,S> base,
TwoWayTransformer<S,V> transformer)
Constructs a new transform property. |
|
void |
setValue(B bean,
V value)
Retransforms the specified value with the underlying transformer and stores it in the specified bean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <B,S,V> Property<B,V> newInstance(Property<B,S> base, TwoWayTransformer<S,V> transformer)
base
- underlying propertytransformer
- underlying transformers
NullPointerException
- if any parameter is null
.public V getValue(B bean)
getValue
in interface Property<B,V>
bean
- the bean from which to read the value
ClassCastException
- depending on the underlying property
and transformer
NullPointerException
- if bean
is null
.
IllegalArgumentException
- depending on the underlying property
and transformerpublic void setValue(B bean, V value)
setValue
in interface Property<B,V>
bean
- the bean in which to store the (retransformed) valuevalue
- the value of the property in the target space of
the transformation
UnsupportedOperationException
- if the underlying property is
read-only or the transformer is one-way
ClassCastException
- depending on the underlying property
and transformer
NullPointerException
- if bean
is null
or if the
specified value is null and the bean does not permit null values
IllegalArgumentException
- depending on the underlying property
and transformer
IllegalStateException
- depending on the underlying propertypublic Class<V> getType()
null
.
getType
in interface Property<B,V>
null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |