void assertDependencies ( final Plugin plugin ) { Collection < Class < ? > > expectedDependencies = new ArrayList <> ( ) ; Collection < Class < ? > > requiredPlugins = plugin . requiredPlugins ( ) ; if ( requiredPlugins != null ) { expectedDependencies . addAll ( requiredPlugins ) ; } Collection < Class < ? > > dependentPlugins = plugin . dependentPlugins ( ) ; if ( dependentPlugins != null ) { expectedDependencies . addAll ( dependentPlugins ) ; } for ( Class < ? > dependencyClass : expectedDependencies ) { List < ? > facets = facetRegistry . getFacets ( dependencyClass ) ; if ( facets . isEmpty ( ) ) { throw new KernelException ( "Plugin %s misses the following dependency: %s" , plugin . name ( ) , dependencyClass . getCanonicalName ( ) ) ; } } }
Verifies that the plugin dependencies are present in the plugin list . The list should contains both dependent and required plugins .