public T get ( Class < ? > clazz ) { if ( map == null || map . isEmpty ( ) ) { return null ; } Class < ? > classToInspect = clazz ; T object = map . get ( classToInspect ) ; if ( object == null && ! excludeInterfaces ) { object = getByInterfaces ( classToInspect ) ; } while ( object == null && classToInspect . getSuperclass ( ) != null ) { classToInspect = classToInspect . getSuperclass ( ) ; object = map . get ( classToInspect ) ; if ( object == null && ! excludeInterfaces ) { object = getByInterfaces ( classToInspect ) ; } } return object ; }
Returns the value of a map entry which key matches the supplied class or any of its super classes or any of its interfaces .