aQute.lib.osgi
public class Analyzer extends Processor
*;auto=true any org.acme.*;auto=true org.acme.xyz org.[abc]*;auto=true org.acme.xyzAdditional, the package instruction can start with a '=' or a '!'. The '!' indicates negation. Any matching package is removed. The '=' is literal, the expression will be copied verbatim and no matching will take place. Any headers in the given properties are used in the output properties.
Constructor Summary | |
---|---|
Analyzer(Processor parent) | |
Analyzer() |
Method Summary | |
---|---|
void | addClasspath(Jar jar) |
void | addClasspath(File cp) |
void | analyze()
Calcualtes the data structures for generating a manifest.
|
Map<String,Clazz> | analyzeBundleClasspath(Jar dot, Map<String,Map<String,String>> bundleClasspath, Map<String,Map<String,String>> contained, Map<String,Map<String,String>> referred, Map<String,Set<String>> uses) |
protected void | begin() |
Manifest | calcManifest()
One of the main workhorses of this class. |
String | calculateExportsFromContents(Jar bundle)
Calculate an export header solely based on the contents of a JAR file
|
boolean | checkClass(String interfaceName)
Check if the given class or interface name is contained in the jar.
|
static String | cleanupVersion(String version) |
void | clear() |
void | close() |
String | getBndInfo(String key, String defaultValue) |
long | getBndLastModified() |
String | getBsn()
Clear the key part of a header. |
Map<String,Map<String,String>> | getBundleClasspath() |
Collection<Clazz> | getClasses(String... args) |
List<Jar> | getClasspath() |
Map<String,Clazz> | getClassspace() |
Map<String,Map<String,String>> | getContained() |
Map<String,Map<String,String>> | getExports() |
protected String | getImportPackages()
Analyzer has an empty default but the builder has a * as default.
|
Map<String,Map<String,String>> | getImports() |
Jar | getJar() |
static Properties | getManifest(File dirOrJar)
Specifically for Maven
|
String | getPackage(String clazz) |
Map<String,Map<String,String>> | getReferred() |
Jar | getTarget() |
Set<String> | getUnreachable()
Return the set of unreachable code depending on exports and the bundle
activator.
|
Map<String,Set<String>> | getUses() |
String | getVersion()
Get the version from the manifest, a lot of work!
|
String | getVersionPolicy() |
void | mergeManifest(Manifest manifest)
Merge the existing manifest with the instructions.
|
void | putAll(Map<String,String> additional, boolean force) |
void | setBase(File file) |
void | setClasspath(File[] classpath)
Set the classpath for this analyzer by file.
|
void | setClasspath(Jar[] classpath) |
void | setClasspath(String[] classpath) |
Jar | setJar(File jar)
Set the JAR file we are going to work in. |
Jar | setJar(Jar jar)
Set the JAR directly we are going to work on.
|
String | _bsn(String[] args) |
String | _classes(String... args) |
String | _exporters(String[] args)
Get the exporter of a package ... |
String | _findname(String[] args) |
String | _findpath(String[] args)
Findpath looks through the contents of the JAR and finds paths that end
with the given regular expression
${findpath (; reg-expr (; replacement)? |
Throws: IOException
Returns:
Throws: IOException
Parameters: bundle The jar file to analyze
Returns:
Parameters: interfaceName
Returns:
Parameters: value
Returns:
Returns:
Parameters: properties the properties
Returns:
Returns: version or unknown.
Parameters: manifest The manifest to merge with
Throws: IOException
Parameters: classpath
Throws: IOException
Parameters: jar
Returns:
Throws: IOException
Parameters: jar
Returns:
Parameters: args
Returns: