aQute.bnd.osgi
Class Analyzer

java.lang.Object
  extended by aQute.bnd.osgi.Domain
      extended by aQute.bnd.osgi.Processor
          extended by aQute.bnd.osgi.Analyzer
All Implemented Interfaces:
Constants, Registry, Report, Reporter, Closeable, Iterable<String>
Direct Known Subclasses:
Builder

public class Analyzer
extends Processor


Nested Class Summary
 
Nested classes/interfaces inherited from class aQute.bnd.osgi.Processor
Processor.CL, Processor.FileLine
 
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
Reporter.SetLocation
 
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
Report.Location
 
Field Summary
protected  AnalyzerMessages msgs
           
 
Fields inherited from class aQute.bnd.osgi.Processor
LIST_SPLITTER
 
Fields inherited from interface aQute.bnd.osgi.Constants
BASELINE, BASELINEREPO, BLUEPRINT_TIMEOUT_ATTRIBUTE, BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE, BND_ADDXMLTOTEST, BND_LASTMODIFIED, BNDDRIVER, BNDDRIVER_ANT, BNDDRIVER_BND, BNDDRIVER_ECLIPSE, BNDDRIVER_GRADLE, BNDDRIVER_GRADLE_NATIVE, BNDDRIVER_INTELLIJ, BNDDRIVER_MAVEN, BNDDRIVER_OSMORC, BNDDRIVER_SBT, BUILDFILES, BUILDPACKAGES, BUILDPATH, BUMPPOLICY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_BLUEPRINT, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_CONTRIBUTORS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DEVELOPERS, BUNDLE_DOCURL, BUNDLE_ICON, BUNDLE_LICENSE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, CACHEDIR, CLASSPATH, COMMAND_DIRECTIVE, COMPILER_SOURCE, COMPILER_TARGET, COMPONENT_ACTIVATE, COMPONENT_CONFIGURATION_POLICY, COMPONENT_DEACTIVATE, COMPONENT_DESCRIPTORS, COMPONENT_DESIGNATE, COMPONENT_DESIGNATEFACTORY, COMPONENT_DYNAMIC, COMPONENT_ENABLED, COMPONENT_FACTORY, COMPONENT_GREEDY, COMPONENT_IMMEDIATE, COMPONENT_IMPLEMENTATION, COMPONENT_MODIFIED, COMPONENT_MULTIPLE, COMPONENT_NAME, COMPONENT_NAMESPACE, COMPONENT_OPTIONAL, COMPONENT_PROPERTIES, COMPONENT_PROVIDE, COMPONENT_SERVICEFACTORY, COMPONENT_VERSION, componentDirectives, CONDITIONAL_PACKAGE, CONDITIONALPACKAGE, CONDUIT, CONSUMER_POLICY, CONTRACT, CREATED_BY, CURRENT_PACKAGE, CURRENT_USES, CURRENT_VERSION, DEBUG, DEFAULT_BAR_EXTENSION, DEFAULT_BND_EXTENSION, DEFAULT_BNDRUN_EXTENSION, DEFAULT_CHARSET, DEFAULT_DO_NOT_COPY, DEFAULT_JAR_EXTENSION, DEFAULT_LAUNCHER_BSN, DEFAULT_PREPROCESSS_MATCHERS, DEFAULT_PROP_BIN_DIR, DEFAULT_PROP_SRC_DIR, DEFAULT_PROP_TARGET_DIR, DEFAULT_PROP_TESTBIN_DIR, DEFAULT_PROP_TESTSRC_DIR, DEFAULT_TESTER_BSN, DEPENDSON, DEPLOY, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, DIFFIGNORE, DIGESTS, directives, DONOTCOPY, DSANNOTATIONS, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EEPROFILE, EEPROFILE_AUTO_ATTRIBUTE, EFFECTIVE_DIRECTIVE, EMBEDDED_REPO, EMPTY, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXPERIMENTS, EXPORT, EXPORT_CONTENTS, EXPORT_PACKAGE, EXPORT_SERVICE, EXTENSION, EXTENSION_DIRECTIVE, FAIL_OK, FILTER_DIRECTIVE, FIXUPMESSAGES, FIXUPMESSAGES_IS_DIRECTIVE, FIXUPMESSAGES_IS_ERROR, FIXUPMESSAGES_IS_IGNORE, FIXUPMESSAGES_IS_WARNING, FIXUPMESSAGES_REPLACE_DIRECTIVE, FIXUPMESSAGES_RESTRICT_DIRECTIVE, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_HOST, FROM_DIRECTIVE, GESTALT, GESTALT_BATCH, GESTALT_CI, GESTALT_INTERACTIVE, GESTALT_OFFLINE, GESTALT_SHELL, headers, IGNORE_PACKAGE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDERESOURCE, INVALIDFILENAMES, JAVAAGENT, JIDENTIFIER, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LAUNCHER_PLUGIN, LIB_DIRECTIVE, LINK_ATTRIBUTE, LITERAL_ATTRIBUTE, MAKE, MANDATORY_DIRECTIVE, MANIFEST, MANIFEST_NAME, META_PERSISTENCE, METAPACKAGES, METATYPE, METATYPE_ANNOTATIONS, NAME_ATTRIBUTE, NAMESECTION, NAMESPACE_STEM, NO_IMPORT_DIRECTIVE, NOANNOTATIONS, NOBUILDINCACHE, NOBUNDLES, NODEFAULTVERSION, NOEE, NOEXTRAHEADERS, NOJUNIT, NOJUNITOSGI, NOMANIFEST, NONE, NOUSES, options, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, OUTPUT, OUTPUTMASK, PACKAGE, PACKAGE_JPM, PATH_DIRECTIVE, PEDANTIC, PLUGIN, PLUGINPATH, PLUGINPATH_SHA1_ATTR, PLUGINPATH_URL_ATTR, POM, PREPROCESSMATCHERS, PRESENCE_DIRECTIVE, PRIVATE_DIRECTIVE, PRIVATE_PACKAGE, PRIVATEPACKAGE, PROCESSOR_ATTRIBUTE, PROFILE, PROVIDE_CAPABILITY, PROVIDE_DIRECTIVE, PROVIDER_POLICY, PROVIDER_TYPE_DIRECTIVE, RELEASEREPO, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVEHEADERS, REPORTNEWER, REPOSITORIES, REQUIRE_BND, REQUIRE_BUNDLE, REQUIRE_CAPABILITY, RESOLUTION_DIRECTIVE, RESOLVE, RESOURCEONLY, RUNBLACKLIST, RUNBUILDS, RUNBUNDLES, RUNEE, RUNENV, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNFW, RUNJDB, RUNNOREFERENCES, RUNPATH, RUNPATH_LAUNCHER_DIRECTIVE, RUNPATH_MAIN_DIRECTIVE, RUNPROGRAMARGS, RUNPROPERTIES, RUNREPOS, RUNREQUIRE, RUNREQUIRES, RUNSTORAGE, RUNSYSTEMCAPABILITIES, RUNSYSTEMPACKAGES, RUNTIMEOUT, RUNTRACE, RUNVM, SAVEMANIFEST, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SET_COMPONENT_DIRECTIVES, SET_COMPONENT_DIRECTIVES_1_1, SET_COMPONENT_DIRECTIVES_1_2, SIGN, SIGN_PASSWORD_DIRECTIVE, SIGNATURE_TEST, SINGLETON_DIRECTIVE, SIZE_ATTRIBUTE, SNAPSHOT, SOURCEPATH, SOURCES, SPECIFICATION_VERSION, SPLIT_PACKAGE_DIRECTIVE, STRICT, SUB, SYSTEMPROPERTIES, TESTCASES, TESTCONTINUOUS, TESTER_PLUGIN, TESTPACKAGES, TESTPATH, TESTREPORT, TESTSOURCES, TESTSUITES, TESTUNRESOLVED, TOOL, UNDERTEST, UPTO, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTR_LATEST, VERSION_ATTR_PROJECT, VERSION_ATTR_SNAPSHOT, VERSION_ATTRIBUTE, VERSION_FILTER, VISIBILITY_DIRECTIVE, WAB, WABLIB
 
Constructor Summary
Analyzer()
           
Analyzer(Processor parent)
           
 
Method Summary
 String _bsn(String[] args)
           
 String _classes(String... args)
           
 String _ee(String[] args)
           
 String _exporters(String[] args)
          Get the exporter of a package ...
 String _exports(String[] args)
           
 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 _frange(String[] args)
          Return a range expression for a filter from a version.
 String _imports(String[] args)
           
 String _md5(String[] args)
           
 String _sha1(String[] args)
           
 void addClasspath(Collection<?> jars)
           
 void addClasspath(File cp)
           
 void addClasspath(Jar jar)
           
 void analyze()
          Calculates the data structures for generating a manifest.
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
 Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> cleanupUses(Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> apiUses, boolean removeJava)
          Remove the own references and optional java references from the uses lib
static String cleanupVersion(String version)
           
 void clear()
           
 void close()
           
protected  void doUses(Descriptors.PackageRef packageRef, Packages exports, Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> uses, Packages imports)
           
 Clazz findClass(Descriptors.TypeRef typeRef)
          Find a clazz on the class path.
 Resource findResource(String path)
          Locate a resource on the class path.
 Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> getAPIUses()
           
 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.
 Collection<Clazz> getClasses(String... args)
           
 List<Jar> getClasspath()
           
 Packages getClasspathExports()
           
 Map<Descriptors.TypeRef,Clazz> getClassspace()
           
 Set<Clazz> getClassspace(Descriptors.PackageRef source)
          Return the classes for a given source package.
 Packages getContained()
           
 Descriptors.Descriptor getDescriptor(String descriptor)
           
 SortedSet<Clazz.JAVA> getEEs()
          Return the EEs
 Packages getExports()
           
protected  Jar getExtra()
           
 Clazz.JAVA getHighestEE()
           
 Packages getImports()
           
 Jar getJar()
           
 Jar getJarFromName(String name, String from)
          Try to get a Jar from a file name/path or a url, or in last resort from the classpath name part of their files.
 Clazz.JAVA getLowestEE()
           
static Properties getManifest(File dirOrJar)
          Specifically for Maven
 File getOutputFile(String output)
          Calculate the output file for the given target.
 Descriptors.PackageRef getPackageRef(String binaryName)
           
 Set<Descriptors.PackageRef> getPrivates()
           
 Packages getReferred()
           
 Jar getTarget()
           
 Descriptors.TypeRef getTypeRef(String binaryClassName)
           
 Descriptors.TypeRef getTypeRefFromFQN(String fqn)
           
 Descriptors.TypeRef getTypeRefFromPath(String path)
           
 Set<Descriptors.PackageRef> getUnreachable()
          Return the set of unreachable code depending on exports and the bundle activator.
 Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> getUses()
           
 String getVersion()
          Answer the bundle version.
 String getVersionPolicy(boolean implemented)
           
 Map<Clazz.Def,List<Descriptors.TypeRef>> getXRef(Descriptors.PackageRef source, Collection<Descriptors.PackageRef> dest, int sourceModifiers)
          Create a cross reference from package source, to packages in dest
 boolean isImported(Descriptors.PackageRef packageRef)
           
 boolean isNoBundle()
           
 void mergeManifest(Manifest manifest)
          Merge the existing manifest with the instructions but do not override existing properties.
 void putAll(Map<String,String> additional, boolean force)
           
 boolean referred(Descriptors.PackageRef packageName)
           
 void referTo(Descriptors.TypeRef ref)
           
 void referToByBinaryName(String binaryClassName)
           
 void report(Map<String,Object> table)
          Report the details of this analyzer
 boolean save(File output, boolean force)
          Utility function to carefully save the file.
 void setBase(File file)
           
 void setClasspath(File[] classpath)
          Set the classpath for this analyzer by file.
 void setClasspath(Jar[] classpath)
           
 void setClasspath(String[] classpath)
           
 void setDefaults(String bsn, Version version)
          Set default import and export instructions if none are set
 void setDiagnostics(boolean b)
           
 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 validResourcePath(String name, String reportIfWrong)
           
 
Methods inherited from class aQute.bnd.osgi.Processor
_basedir, _native_capability, _propertiesdir, _propertiesname, _random, addBasicPlugin, addClose, addExtensions, addIncluded, addProperties, addProperties, append, appendPath, beginHandleErrors, check, concat, customize, doAttrbutes, doIncludeFile, doIncludeFile, endHandleErrors, error, error, exception, exists, findHeader, findHeader, forceRefresh, formatArrays, get, get, getBase, getClass, getDuration, getErrors, getExecutor, getFile, getFile, getFlattenedProperties, getFlattenedProperties, getHeader, getHeader, getIncluded, getInfo, getInfo, getLine, getLoader, getLocation, getMacroDomains, getManifestAsProperties, getParent, getPlugin, getPlugins, getPlugins, getProperties, getPropertiesFile, getProperty, getProperty, getProperty, getPropertyKeys, getReplacer, getTop, getUnprocessedProperty, getWarnings, is, isDuplicate, isExceptions, isFailOk, isMissingPlugin, isOk, isPedantic, isPerfect, isTrace, isTrue, iterator, join, join, join, join, join, keySet, lastModified, loadPlugins, loadProperties, makePrintable, merge, mergeProperties, mergeProperties, mergeProperties, mergeProperties, newHashMap, newList, newList, newMap, newMap, newSet, newSet, normalize, normalize, parseHeader, parseHeader, printClause, printClauses, printClauses, printExceptionSummary, printStackTrace, progress, progress, propertiesChanged, quote, read, refresh, removeBasicPlugin, removeClose, removeDuplicateMarker, replaceAll, replaceExtension, report, set, setExceptions, setFileMustExist, setForceLocal, setParent, setPedantic, setProperties, setProperties, setProperties, setProperty, setTrace, setTypeSpecificPlugins, signal, since, split, split, split, toString, trace, unsetProperty, updateModified, use, warning
 
Methods inherited from class aQute.bnd.osgi.Domain
domain, domain, domain, domain, getBundleActivator, getBundleClasspath, getBundleClassPath, getBundleRequiredExecutionEnvironment, getBundleSymbolicName, getBundleVersion, getDynamicImportPackage, getExportContents, getExportPackage, getFragmentHost, getIcon, getImportPackage, getIncludeResource, getParameters, getParameters, getParameters, getParameters, getPrivatePackage, getProvideCapability, getRequireBundle, getRequireCapability, isSources, setBundleActivator, setBundleClasspath, setBundleRequiredExecutionEnvironment, setBundleSymbolicName, setBundleVersion, setBundleVersion, setConditionalPackage, setExportPackage, setFailOk, setImportPackage, setIncludeResource, setPrivatePackage, setSources, setTranslation, translate, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

msgs

protected final AnalyzerMessages msgs
Constructor Detail

Analyzer

public Analyzer(Processor parent)

Analyzer

public Analyzer()
Method Detail

getManifest

public static Properties getManifest(File dirOrJar)
                              throws Exception
Specifically for Maven

Parameters:
properties - the properties
Throws:
Exception

analyze

public void analyze()
             throws Exception
Calculates the data structures for generating a manifest.

Throws:
IOException
Exception

getExtra

protected Jar getExtra()
                throws Exception
Throws:
Exception

calcManifest

public Manifest calcManifest()
                      throws Exception
One of the main workhorses of this class. This will analyze the current setup and calculate a new manifest according to this setup.

Returns:
Throws:
IOException
Exception

getBsn

public String getBsn()
Clear the key part of a header. I.e. remove everything from the first ';'

Parameters:
value -
Returns:

_bsn

public String _bsn(String[] args)

calculateExportsFromContents

public String calculateExportsFromContents(Jar bundle)
Calculate an export header solely based on the contents of a JAR file

Parameters:
bundle - The jar file to analyze
Returns:

getContained

public Packages getContained()

getExports

public Packages getExports()

getImports

public Packages getImports()

getPrivates

public Set<Descriptors.PackageRef> getPrivates()

getJar

public Jar getJar()

getReferred

public Packages getReferred()

getUnreachable

public Set<Descriptors.PackageRef> getUnreachable()
Return the set of unreachable code depending on exports and the bundle activator.

Returns:

getUses

public Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> getUses()

getAPIUses

public Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> getAPIUses()

getClasspathExports

public Packages getClasspathExports()

getBndVersion

public String getBndVersion()
Get the version for this bnd

Returns:
version or unknown.

getBndLastModified

public long getBndLastModified()

getBndInfo

public String getBndInfo(String key,
                         String defaultValue)

mergeManifest

public void mergeManifest(Manifest manifest)
                   throws IOException
Merge the existing manifest with the instructions but do not override existing properties.

Parameters:
manifest - The manifest to merge with
Throws:
IOException

setBase

public void setBase(File file)
Overrides:
setBase in class Processor

setClasspath

public void setClasspath(File[] classpath)
                  throws IOException
Set the classpath for this analyzer by file.

Parameters:
classpath -
Throws:
IOException

setClasspath

public void setClasspath(Jar[] classpath)

setClasspath

public void setClasspath(String[] classpath)

setJar

public Jar setJar(File jar)
           throws IOException
Set the JAR file we are going to work in. This will read the JAR in memory.

Parameters:
jar -
Returns:
Throws:
IOException

setJar

public Jar setJar(Jar jar)
Set the JAR directly we are going to work on.

Parameters:
jar -
Returns:

begin

protected void begin()
Overrides:
begin in class Processor

getJarFromName

public Jar getJarFromName(String name,
                          String from)
Try to get a Jar from a file name/path or a url, or in last resort from the classpath name part of their files.

Overrides:
getJarFromName in class Processor
Parameters:
name - URL or filename relative to the base
from - Message identifying the caller for errors
Returns:
null or a Jar with the contents for the name

referred

public boolean referred(Descriptors.PackageRef packageName)

doUses

protected void doUses(Descriptors.PackageRef packageRef,
                      Packages exports,
                      Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> uses,
                      Packages imports)
Parameters:
packageName -
exports -
uses -
imports -

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class Processor

_findpath

public 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)? )? }

Parameters:
args -
Returns:

_findname

public String _findname(String[] args)

putAll

public void putAll(Map<String,String> additional,
                   boolean force)

getClasspath

public List<Jar> getClasspath()

addClasspath

public void addClasspath(Jar jar)

addClasspath

public void addClasspath(Collection<?> jars)
                  throws IOException
Throws:
IOException

addClasspath

public void addClasspath(File cp)
                  throws IOException
Throws:
IOException

clear

public void clear()
Overrides:
clear in class Processor

getTarget

public Jar getTarget()

cleanupVersion

public static String cleanupVersion(String version)

getVersionPolicy

public String getVersionPolicy(boolean implemented)

_classes

public String _classes(String... args)
                throws Exception
Throws:
Exception

getClasses

public Collection<Clazz> getClasses(String... args)
                             throws Exception
Throws:
Exception

_exporters

public String _exporters(String[] args)
                  throws Exception
Get the exporter of a package ...

Throws:
Exception

getClassspace

public Map<Descriptors.TypeRef,Clazz> getClassspace()

findResource

public Resource findResource(String path)
Locate a resource on the class path.

Parameters:
path - Path of the reosurce
Returns:
A resource or null

findClass

public Clazz findClass(Descriptors.TypeRef typeRef)
                throws Exception
Find a clazz on the class path. This class has been parsed.

Parameters:
path -
Returns:
Throws:
Exception

getVersion

public String getVersion()
Answer the bundle version.

Returns:

isNoBundle

public boolean isNoBundle()

referTo

public void referTo(Descriptors.TypeRef ref)

referToByBinaryName

public void referToByBinaryName(String binaryClassName)

_md5

public String _md5(String[] args)
            throws Exception
Throws:
Exception

_sha1

public String _sha1(String[] args)
             throws Exception
Throws:
Exception

getDescriptor

public Descriptors.Descriptor getDescriptor(String descriptor)

getTypeRef

public Descriptors.TypeRef getTypeRef(String binaryClassName)

getPackageRef

public Descriptors.PackageRef getPackageRef(String binaryName)

getTypeRefFromFQN

public Descriptors.TypeRef getTypeRefFromFQN(String fqn)

getTypeRefFromPath

public Descriptors.TypeRef getTypeRefFromPath(String path)

isImported

public boolean isImported(Descriptors.PackageRef packageRef)

setDiagnostics

public void setDiagnostics(boolean b)

getLowestEE

public Clazz.JAVA getLowestEE()

getHighestEE

public Clazz.JAVA getHighestEE()

_ee

public String _ee(String[] args)

getOutputFile

public File getOutputFile(String output)
Calculate the output file for the given target. The strategy is:
 parameter given if not null and not directory
 if directory, this will be the output directory
 based on bsn-version.jar
 name of the source file if exists
 Untitled-[n]
 

Parameters:
output - may be null, otherwise a file path relative to base

save

public boolean save(File output,
                    boolean force)
             throws Exception
Utility function to carefully save the file. Will create a backup if the source file has the same path as the output. It will also only save if the file was modified or the force flag is true

Parameters:
output - the output file, if null getOutputFile(String) is used.
force - if it needs to be overwritten
Throws:
Exception

setDefaults

public void setDefaults(String bsn,
                        Version version)
Set default import and export instructions if none are set


cleanupUses

public Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> cleanupUses(Map<Descriptors.PackageRef,List<Descriptors.PackageRef>> apiUses,
                                                                            boolean removeJava)
Remove the own references and optional java references from the uses lib

Parameters:
apiUses -
removeJava -
Returns:

getClassspace

public Set<Clazz> getClassspace(Descriptors.PackageRef source)
Return the classes for a given source package.

Parameters:
source - the source package
Returns:
a set of classes for the requested package.

getXRef

public Map<Clazz.Def,List<Descriptors.TypeRef>> getXRef(Descriptors.PackageRef source,
                                                        Collection<Descriptors.PackageRef> dest,
                                                        int sourceModifiers)
                                                 throws Exception
Create a cross reference from package source, to packages in dest

Parameters:
source -
dest -
sourceModifiers -
Returns:
Throws:
Exception

_exports

public String _exports(String[] args)

_imports

public String _imports(String[] args)

report

public void report(Map<String,Object> table)
            throws Exception
Report the details of this analyzer

Overrides:
report in class Processor
Throws:
Exception

getEEs

public SortedSet<Clazz.JAVA> getEEs()
Return the EEs


_frange

public String _frange(String[] args)
Return a range expression for a filter from a version. By default this is based on consumer compatibility. You can specify a third argument (true) to get provider compatibility.
 ${frange;1.2.3}             -> (&(version>=1.2.3)(!(version>=1.3.0))
 ${frange;1.2.3, true}       -> (&(version>=1.2.3)(!(version>=2.0.0))
 


validResourcePath

public String validResourcePath(String name,
                                String reportIfWrong)
Parameters:
name -
Returns:


Copyright © 2014 aQute SARL. All rights reserved.