public void onApplicationEvent( ApplicationEvent event ) {
if ( !( event instanceof LifecycleApplicationEvent ) ) {
return;
}
LifecycleApplicationEvent lifecycleEvent = ( LifecycleApplicationEvent ) event;
if ( !type.isAssignableFrom( lifecycleEvent.getObject().getClass() ) ) {
return;
}
@NonNls
String eventType = ( ( LifecycleApplicationEvent ) event ).getEventType();
if ( LifecycleApplicationEvent.CREATED.equals( eventType ) || LifecycleApplicationEvent.DELETED.equals( eventType ) || LifecycleApplicationEvent.MODIFIED.equals( eventType ) ) {
handle( this.type.cast( lifecycleEvent.getObject() ), lifecycleEvent );
}
}