org.jbeans
Class ConversionEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.jbeans.BaseEvent
|
+--org.jbeans.ConversionEvent
- All Implemented Interfaces:
- Serializable
- public class ConversionEvent
- extends BaseEvent
This class is the event that is generated when a bean property is
being set AND the value is being automatically converted.
The getOldValue
and getNewValue
methods in BaseEvent
class are different for this event and are described
here:
getOldValue - Returns the value of the parameter that is
being converted BEFORE it is converted. This value will remain the
same for the pre, post and failed conversion events.
getNewValue - Returns the value of the parameter that is
being converted AFTER it is converted. For pre-conversion events
this will be equal to the value of getOldValue because the conversion
has not yet taken place. For post-conversion events, this will have
the value of the parameter AFTER it has been converted. For
failed-conversion events, this will be equal to the value of
getOldValue because the conversion failed before completing.
It is also important to remember that if a conversion fails, only
the pre-conversion and failed-conversion events will occur. If
the conversion succeeded, then only the pre-conversion and
post-conversion events will occur.
- Author:
- Brian Pontarelli
- See Also:
- Serialized Form
ConversionEvent
public ConversionEvent(BaseBeanProperty property,
Object oldValue,
Object newValue,
Object bean)
- Creates a new conversion event using the values given