com.springsource.bundlor.internal
Class StandardBundleAnalyzer

java.lang.Object
  extended by com.springsource.bundlor.internal.StandardBundleAnalyzer
All Implemented Interfaces:
BundleAnalyzer

public class StandardBundleAnalyzer
extends java.lang.Object
implements BundleAnalyzer

The standard implementation of BundleAnalyzer

Concurrent Semantics
Threadsafe

Author:
Ben Hale

Field Summary
private  java.util.List<ArtefactAnalyser> artifactAnalyzers
           
private  ReadablePartialManifestFactory partialManifestFactory
           
 
Constructor Summary
StandardBundleAnalyzer(java.util.List<ArtefactAnalyser> artifactAnalyzers, ReadablePartialManifestFactory partialManifestFactory)
           
 
Method Summary
private  ReadablePartialManifest analyzeBundle(java.util.jar.JarFile inputJar)
           
private  void analyzeEntry(java.lang.String artefactName, java.io.InputStream in, PartialManifest partialManifest)
           
 java.util.Set<java.lang.String> exportablePackages(java.lang.String path)
          Determines the set of packages exported by this bundle
 java.util.Set<java.lang.String> importablePackages(java.lang.String path)
          Determines the set of package imports that a bundle needs to have satisfied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

artifactAnalyzers

private final java.util.List<ArtefactAnalyser> artifactAnalyzers

partialManifestFactory

private final ReadablePartialManifestFactory partialManifestFactory
Constructor Detail

StandardBundleAnalyzer

public StandardBundleAnalyzer(java.util.List<ArtefactAnalyser> artifactAnalyzers,
                              ReadablePartialManifestFactory partialManifestFactory)
Method Detail

importablePackages

public java.util.Set<java.lang.String> importablePackages(java.lang.String path)
Determines the set of package imports that a bundle needs to have satisfied

Specified by:
importablePackages in interface BundleAnalyzer
Parameters:
path - The path to the jar file to analyze
Returns:
The set of names of imported packages needed by the bundle

exportablePackages

public java.util.Set<java.lang.String> exportablePackages(java.lang.String path)
Description copied from interface: BundleAnalyzer
Determines the set of packages exported by this bundle

Specified by:
exportablePackages in interface BundleAnalyzer
Parameters:
path - The path to the jar file to analyze
Returns:
The set of names of exported packages in the bundle

analyzeBundle

private ReadablePartialManifest analyzeBundle(java.util.jar.JarFile inputJar)

analyzeEntry

private void analyzeEntry(java.lang.String artefactName,
                          java.io.InputStream in,
                          PartialManifest partialManifest)