static String basePluginKey ( PluginInfo plugin , Map < String , PluginInfo > allPluginsPerKey ) { String base = plugin . getKey ( ) ; String parentKey = plugin . getBasePlugin ( ) ; while ( ! Strings . isNullOrEmpty ( parentKey ) ) { PluginInfo parentPlugin = allPluginsPerKey . get ( parentKey ) ; base = parentPlugin . getKey ( ) ; parentKey = parentPlugin . getBasePlugin ( ) ; } return base ; }
Get the root key of a tree of plugins . For example if plugin C depends on B which depends on A then B and C must be attached to the classloader of A . The method returns A in the three cases .