public static boolean isDependency ( Extension extension , String namespace ) { boolean isDependency = false ; if ( namespace == null ) { isDependency = extension . getProperty ( PKEY_DEPENDENCY , false ) ; } else { Object namespacesObject = extension . getProperty ( PKEY_NAMESPACES ) ; // RETRO-COMPATIBILITY: used to be a String collection with just the actual namespaces if ( namespacesObject instanceof Map ) { Map < String , Object > installedNamespace = ( ( Map < String , Map < String , Object > > ) namespacesObject ) . get ( namespace ) ; isDependency = installedNamespace != null ? ( installedNamespace . get ( PKEY_NAMESPACES_DEPENDENCY ) == Boolean . TRUE ) : isDependency ( extension , null ) ; } else { isDependency = isDependency ( extension , null ) ; } } return isDependency ; }
Indicate if the extension as been installed as a dependency of another one .