Class WorkspaceClassIndex

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    class WorkspaceClassIndex
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Workspace workspace  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addLongestMatchingPackagePrefix​(java.lang.String packageName, java.util.List<org.osgi.resource.Capability> caps, BundleId bundle, MultiMap<BundleId,​java.lang.String> result)  
      void close()  
      private java.lang.String createFilter​(java.lang.String packageName, java.lang.String className)  
      private java.util.Map<org.osgi.resource.Resource,​java.util.List<org.osgi.resource.Capability>> getMatchingResources​(java.lang.String filter)  
      private java.lang.String matchClassNameAgainstResource​(java.lang.String binaryClassName, java.util.List<org.osgi.resource.Capability> caps, BundleId bundle, MultiMap<BundleId,​java.lang.String> result)  
      (package private) Result<java.util.Map<java.lang.String,​java.util.List<BundleId>>,​java.lang.String> search​(java.lang.String partialFqn)
      Search the bundles that contain the given partialFqn.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkspaceClassIndex

        WorkspaceClassIndex​(Workspace workspace)
    • Method Detail

      • search

        Result<java.util.Map<java.lang.String,​java.util.List<BundleId>>,​java.lang.String> search​(java.lang.String partialFqn)
                                                                                                      throws java.lang.Exception
        Search the bundles that contain the given partialFqn. A partialFqn is either a package name, package prefix or a full FQN class name.

        The result is a map that has the full class name (FQN) as the key and a list of bundle ids as value.

        Parameters:
        partialFqn - package and/or class name
        Returns:
        a multimap of fqn|pack->bundleid
        Throws:
        java.lang.Exception
      • matchClassNameAgainstResource

        private java.lang.String matchClassNameAgainstResource​(java.lang.String binaryClassName,
                                                               java.util.List<org.osgi.resource.Capability> caps,
                                                               BundleId bundle,
                                                               MultiMap<BundleId,​java.lang.String> result)
      • addLongestMatchingPackagePrefix

        private void addLongestMatchingPackagePrefix​(java.lang.String packageName,
                                                     java.util.List<org.osgi.resource.Capability> caps,
                                                     BundleId bundle,
                                                     MultiMap<BundleId,​java.lang.String> result)
      • getMatchingResources

        private java.util.Map<org.osgi.resource.Resource,​java.util.List<org.osgi.resource.Capability>> getMatchingResources​(java.lang.String filter)
                                                                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createFilter

        private java.lang.String createFilter​(java.lang.String packageName,
                                              java.lang.String className)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable