|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.data.util.AbstractProperty<T>
com.vaadin.data.util.NestedMethodProperty<T>
public class NestedMethodProperty<T>
Nested accessor based property for a bean. The property is specified in the dotted notation, e.g. "address.street", and can contain multiple levels of nesting. When accessing the property value, all intermediate getters must exist and should return non-null values when the property value is accessed. If an intermediate getter returns null, a null value will be returned.
MethodProperty
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.data.util.AbstractProperty |
---|
AbstractProperty.ReadOnlyStatusChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
Constructor Summary | |
---|---|
NestedMethodProperty(java.lang.Object instance,
java.lang.String propertyName)
Constructs a nested method property for a given object instance. |
Method Summary | |
---|---|
protected java.util.List<java.lang.reflect.Method> |
getGetMethods()
Returns an unmodifiable list of getter methods to call in sequence to get the property value. |
java.lang.Class<? extends T> |
getType()
Returns the type of the Property. |
T |
getValue()
Gets the value stored in the Property. |
protected void |
invokeSetMethod(T value)
Internal method to actually call the setter method of the wrapped property. |
boolean |
isReadOnly()
Tests if the Property is in read-only mode. |
void |
setValue(T newValue)
Sets the value of the property. |
Methods inherited from class com.vaadin.data.util.AbstractProperty |
---|
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireReadOnlyStatusChange, fireValueChange, getListeners, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, setReadOnly, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NestedMethodProperty(java.lang.Object instance, java.lang.String propertyName)
Calling getValue will return null if any intermediate getter returns null
instance
- top-level bean to which the property appliespropertyName
- dot separated nested property name
java.lang.IllegalArgumentException
- if the property name is invalidMethod Detail |
---|
public java.lang.Class<? extends T> getType()
Property
getValue
and
setValue
must be compatible with this type: one must be able
to safely cast the value returned from getValue
to the given
type and pass any variable assignable to this type as an argument to
setValue
.
public boolean isReadOnly()
AbstractProperty
setValue
will throw
ReadOnlyException
and will not modify the value of the
Property.
Override for additional restrictions on what is considered a read-only
property.
isReadOnly
in interface Property<T>
isReadOnly
in class AbstractProperty<T>
true
if the Property is in read-only mode,
false
if it's notpublic T getValue()
public void setValue(T newValue) throws Property.ReadOnlyException
newValue
- the New value of the property.
Property.ReadOnlyException
- if the object is in
read-only mode.
Property.ReadOnlyException
- if the object is in read-only modeinvokeSetMethod(Object)
protected void invokeSetMethod(T value)
value
- protected java.util.List<java.lang.reflect.Method> getGetMethods()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |