getLastReturnValue
Object getLastReturnValue ( )
Description
Returns the LastReturnValue for the object. This is the value previously returned by another callback. This can be null, if no callbacks have been fired yet for this event. A null value is also the default return value for the given event.
Parameters
This method does not receive any parameters.
Return Values
Returns the LastReturnValue for the object.
Change Log
Version | Description |
---|---|
6.0.55a | Available for all editions. |
Examples
Write to Log
// In practice AbstractEventData is just the abstract class.
// You must actually use one of the classes that extend it.
public Object handleEvent(EventFireTime fireTime, AbstractEventData data) {
// While you can specifically grab any data from the data object,
// if this is a method that has a return value that matters,
// it's best to get it as the last return value, so that multiple
// events can be chained together. The input data object
// will always have the original values for all the other getters
Object returnValue = data.getLastReturnValue();
// do something
// The EventFireTime values describe in the documentation what the return
// value will do, or says nothing about it if the value is ignored
// If you don't intend to modify the return, always return data.getLastReturnValue();
return data.getLastReturnValue();
}
// You must actually use one of the classes that extend it.
public Object handleEvent(EventFireTime fireTime, AbstractEventData data) {
// While you can specifically grab any data from the data object,
// if this is a method that has a return value that matters,
// it's best to get it as the last return value, so that multiple
// events can be chained together. The input data object
// will always have the original values for all the other getters
Object returnValue = data.getLastReturnValue();
// do something
// The EventFireTime values describe in the documentation what the return
// value will do, or says nothing about it if the value is ignored
// If you don't intend to modify the return, always return data.getLastReturnValue();
return data.getLastReturnValue();
}
samt on 03/10/2016 at 4:43 pm
- Printer-friendly version
- Login or register to post comments