private Event . Type getEventTypeFromAnnotation ( Class < ? extends Annotation > annotation ) { if ( annotation == CacheEntryCreated . class ) return Event . Type . CACHE_ENTRY_CREATED ; if ( annotation == CacheEntryModified . class ) return Event . Type . CACHE_ENTRY_MODIFIED ; if ( annotation == CacheEntryRemoved . class ) return Event . Type . CACHE_ENTRY_REMOVED ; if ( annotation == CacheEntryActivated . class ) return Event . Type . CACHE_ENTRY_ACTIVATED ; if ( annotation == CacheEntryInvalidated . class ) return Event . Type . CACHE_ENTRY_INVALIDATED ; if ( annotation == CacheEntryLoaded . class ) return Event . Type . CACHE_ENTRY_LOADED ; if ( annotation == CacheEntryPassivated . class ) return Event . Type . CACHE_ENTRY_PASSIVATED ; if ( annotation == CacheEntryVisited . class ) return Event . Type . CACHE_ENTRY_VISITED ; if ( annotation == CacheEntriesEvicted . class ) return Event . Type . CACHE_ENTRY_EVICTED ; if ( annotation == CacheEntryExpired . class ) return Event . Type . CACHE_ENTRY_EXPIRED ; return null ; }
Obtains the event type that corresponds to the given event annotation .