@ SuppressWarnings ( "PMD.PrematureDeclaration" ) private void resolveExtensions ( final ExtensionsHolder holder ) { final Stopwatch timer = context . stat ( ) . timer ( Stat . ExtensionsRecognitionTime ) ; final boolean guiceFirstMode = context . option ( JerseyExtensionsManagedByGuice ) ; final List < Class < ? > > manual = context . getEnabledExtensions ( ) ; for ( Class < ? > type : manual ) { if ( ! processType ( type , holder , guiceFirstMode , false ) ) { throw new IllegalStateException ( "No installer found for extension " + type . getName ( ) + ". Available installers: " + holder . getInstallerTypes ( ) . stream ( ) . map ( FeatureUtils :: getInstallerExtName ) . collect ( Collectors . joining ( ", " ) ) ) ; } } if ( scanner != null ) { scanner . scan ( type -> { if ( manual . contains ( type ) ) { // avoid duplicate extension installation, but register it's appearance in auto scan scope context . getOrRegisterExtension ( type , true ) ; } else { processType ( type , holder , guiceFirstMode , true ) ; } } ) ; } context . lifecycle ( ) . extensionsResolved ( context . getEnabledExtensions ( ) , context . getDisabledExtensions ( ) ) ; timer . stop ( ) ; }
Performs one more classpath scan to search for extensions or simply install manually provided extension classes .