@ SuppressWarnings ( "unchecked" ) public static < T > EventScope < T > get ( final Class < T > pEventType ) { if ( pEventType == Object . class ) { return null ; } EventScope < T > lResult = ( EventScope < T > ) sScopes . get ( pEventType ) ; if ( lResult != null ) { return lResult ; } for ( final Class < ? > lInterface : pEventType . getInterfaces ( ) ) { lResult = ( EventScope < T > ) sScopes . get ( pEventType ) ; if ( lResult != null ) { return lResult ; } } // still here - dive into super class return ( EventScope < T > ) get ( pEventType . getSuperclass ( ) ) ; }
Returns the event scope bound to that event type . This is an expensive operation so make sure to only call as seldom as possible .