|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaQute.lib.osgi.Processor
aQute.lib.osgi.Analyzer
public class Analyzer
Field Summary |
---|
Fields inherited from class aQute.lib.osgi.Processor |
---|
LIST_SPLITTER |
Constructor Summary | |
---|---|
Analyzer()
|
|
Analyzer(Processor parent)
|
Method Summary | |
---|---|
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)? )? } |
String |
_md5(String[] args)
|
String |
_sha1(String[] args)
|
void |
addClasspath(File cp)
|
void |
addClasspath(Jar jar)
|
void |
analyze()
Calculates the data structures for generating a manifest. |
protected 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()
|
protected void |
doUses(String packageName,
Map<String,Map<String,String>> exports,
Map<String,Set<String>> uses,
Map<String,Map<String,String>> imports)
|
Clazz |
findClass(String path)
Find a clazz on the class path. |
Resource |
findResource(String path)
Locate a resource on the class path. |
String |
getBndInfo(String key,
String defaultValue)
|
long |
getBndLastModified()
|
String |
getBndVersion()
Get the version for this bnd |
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()
|
MultiMap<Set<String>,String> |
getGroups()
Calculate the groups inside the bundle. |
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()
Answer the bundle version. |
String |
getVersionPolicy(boolean implemented)
|
boolean |
isNoBundle()
|
void |
mergeManifest(Manifest manifest)
Merge the existing manifest with the instructions. |
void |
putAll(Map<String,String> additional,
boolean force)
|
boolean |
referred(String packageName)
|
void |
referTo(String impl)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Analyzer(Processor parent)
public Analyzer()
Method Detail |
---|
public static Properties getManifest(File dirOrJar) throws Exception
properties
- the properties
Exception
public void analyze() throws Exception
IOException
Exception
protected String getImportPackages()
public Manifest calcManifest() throws Exception
IOException
Exception
public String getBsn()
value
-
public String _bsn(String[] args)
public String calculateExportsFromContents(Jar bundle)
bundle
- The jar file to analyze
public Map<String,Map<String,String>> getBundleClasspath()
public Map<String,Map<String,String>> getContained()
public Map<String,Map<String,String>> getExports()
public Map<String,Map<String,String>> getImports()
public Jar getJar()
public Map<String,Map<String,String>> getReferred()
public Set<String> getUnreachable()
public Map<String,Set<String>> getUses()
public String getBndVersion()
public long getBndLastModified()
public String getBndInfo(String key, String defaultValue)
public void mergeManifest(Manifest manifest) throws IOException
manifest
- The manifest to merge with
IOException
public void setBase(File file)
setBase
in class Processor
public void setClasspath(File[] classpath) throws IOException
classpath
-
IOException
public void setClasspath(Jar[] classpath)
public void setClasspath(String[] classpath)
public Jar setJar(File jar) throws IOException
jar
-
IOException
public Jar setJar(Jar jar)
jar
-
protected void begin()
begin
in class Processor
public boolean checkClass(String interfaceName)
interfaceName
-
public boolean referred(String packageName)
protected void doUses(String packageName, Map<String,Map<String,String>> exports, Map<String,Set<String>> uses, Map<String,Map<String,String>> imports)
packageName
- exports
- uses
- imports
- public void close()
close
in interface Closeable
close
in class Processor
public String _findpath(String[] args)
args
-
public String _findname(String[] args)
public void putAll(Map<String,String> additional, boolean force)
public List<Jar> getClasspath()
public void addClasspath(Jar jar)
public void addClasspath(File cp) throws IOException
IOException
public void clear()
clear
in class Processor
public Jar getTarget()
protected 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) throws Exception
Exception
public static String cleanupVersion(String version)
public String getPackage(String clazz)
public String getVersionPolicy(boolean implemented)
public String _classes(String... args) throws Exception
Exception
public Collection<Clazz> getClasses(String... args) throws Exception
Exception
public String _exporters(String[] args) throws Exception
Exception
public Map<String,Clazz> getClassspace()
public Resource findResource(String path)
path
- Path of the reosurce
null
public Clazz findClass(String path) throws Exception
path
-
Exception
public String getVersion()
public boolean isNoBundle()
public void referTo(String impl)
public MultiMap<Set<String>,String> getGroups()
public String _md5(String[] args) throws Exception
Exception
public String _sha1(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |