/******************************************************************************************************************* * * ******************************************************************************************************************/ @Nonnull private static <T> T simpleFind (final @Nonnull Class<T> serviceClass) { final T service = Lookup.getDefault().lookup(serviceClass); if (service == null) { throw new NotFoundException(serviceClass); } return service; }
throw new NotFoundException(topComponentClass.getSimpleName());
throw new NotFoundException(topComponentClass.getSimpleName());
/******************************************************************************************************************* * * ******************************************************************************************************************/ @Nonnull private static <T> T simpleFind (final @Nonnull Class<T> serviceClass) { final T service = Lookup.getDefault().lookup(serviceClass); if (service == null) { throw new NotFoundException(serviceClass); } return service; }