Package aQute.bnd.build
Class WorkspaceClassIndex
- java.lang.Object
-
- aQute.bnd.build.WorkspaceClassIndex
-
- All Implemented Interfaces:
java.lang.AutoCloseable
class WorkspaceClassIndex extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description WorkspaceClassIndex(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.
-
-
-
Field Detail
-
workspace
final Workspace workspace
-
-
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 interfacejava.lang.AutoCloseable
-
-