Package aQute.bnd.osgi
Class Analyzer
java.lang.Object
aQute.bnd.osgi.Domain
aQute.bnd.osgi.Processor
aQute.bnd.osgi.Analyzer
- All Implemented Interfaces:
Constants
,Registry
,aQute.service.reporter.Report
,aQute.service.reporter.Reporter
,Closeable
,AutoCloseable
,Iterable<String>
- Direct Known Subclasses:
Builder
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class aQute.bnd.osgi.Processor
Processor.CL, Processor.FileLine
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
aQute.service.reporter.Report.Location
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
aQute.service.reporter.Reporter.SetLocation
-
Field Summary
FieldsFields inherited from class aQute.bnd.osgi.Processor
LIST_SPLITTER, log
Fields inherited from interface aQute.bnd.osgi.Constants
ACCESS_ATTRIBUTE, AUGMENT, AUGMENT_CAPABILITY_DIRECTIVE, AUGMENT_RANGE_ATTRIBUTE, AUGMENT_REQUIREMENT_DIRECTIVE, AUTOMATIC_MODULE_NAME, 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, BSN_SOURCE_SUFFIX, BUILDERIGNORE, BUILDFILES, BUILDPACKAGES, BUILDPATH, BUILDREPO, 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_SCM, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, BUNDLEANNOTATIONS, CACHEDIR, CARDINALITY_DIRECTIVE, CDIANNOTATIONS, CHECK, CLASS_ATTRIBUTE, 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, COMPRESSION, CONDITIONAL_PACKAGE, CONDITIONALPACKAGE, CONDUIT, CONNECTION_SETTINGS, CONSUMER_POLICY, CONTRACT, CREATED_BY, CURRENT_BUNDLESYMBOLICNAME, CURRENT_BUNDLEVERSION, 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, DEFINE_CONTRACT, DEPENDSON, DEPLOY, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, DIFFIGNORE, DIFFPACKAGES, DIGESTS, directives, DISTRO, DONOTCOPY, DSANNOTATIONS, DSANNOTATIONS_OPTIONS, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EE_ATTRIBUTE, EEPROFILE, EEPROFILE_AUTO_ATTRIBUTE, EFFECTIVE_DIRECTIVE, EMBEDDED_REPO, EMPTY, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXECUTABLE, EXPERIMENTS, EXPORT, EXPORT_APIGUARDIAN, EXPORT_BSN, EXPORT_CONTENTS, EXPORT_NAME, EXPORT_PACKAGE, EXPORT_SERVICE, EXPORT_TYPE, EXPORT_VERSION, EXPORTS_ATTRIBUTE, EXPORTTYPE, 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, GENERATE, GESTALT, GESTALT_BATCH, GESTALT_CI, GESTALT_INTERACTIVE, GESTALT_OFFLINE, GESTALT_SHELL, GROUPID, headers, IDENTITY_INITIAL_RESOURCE, IDENTITY_SYSTEM_RESOURCE, IGNORE_ATTRIBUTE, IGNORE_PACKAGE, IGNORE_STANDALONE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDEPACKAGE, INCLUDERESOURCE, INIT, INTERNAL_BUNDLESYMBOLICNAME_DIRECTIVE, INTERNAL_BUNDLEVERSION_DIRECTIVE, INTERNAL_EXPORT_TO_MODULES_DIRECTIVE, INTERNAL_EXPORTED_DIRECTIVE, INTERNAL_MODULE_VERSION_DIRECTIVE, INTERNAL_OPEN_TO_MODULES_DIRECTIVE, INTERNAL_SOURCE_DIRECTIVE, INVALIDFILENAMES, JAVA, JAVA_DEBUG, JAVAAGENT, JAVAC, JAVAC_ENCODING, JAVAC_PROFILE, JAVAC_SOURCE, JAVAC_TARGET, JIDENTIFIER, JPMS_MODULE_INFO, JPMS_MODULE_INFO_OPTIONS, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LAUNCH_ACTIVATION_EAGER, LAUNCH_ACTIVATORS, LAUNCH_RUNBUNDLES_ATTRS, LAUNCH_STARTLEVEL_DEFAULT, LAUNCH_TRACE, LAUNCHER_PLUGIN, LIB_DIRECTIVE, LINK_ATTRIBUTE, LITERAL_ATTRIBUTE, MAIN_CLASS, MAKE, MANDATORY_DIRECTIVE, MANIFEST, MANIFEST_NAME, MAVEN_DEPENDENCIES, MAVEN_RELEASE, MAVEN_SCOPE, META_PERSISTENCE, METAPACKAGES, METATYPE, METATYPE_ANNOTATIONS, METATYPE_ANNOTATIONS_OPTIONS, MIME_TYPE_BUNDLE, MIME_TYPE_JAR, MODULE_INFO_CLASS, MODULES_ATTRIBUTE, NAME_ATTRIBUTE, NAMESECTION, NAMESPACE_STEM, NO_IMPORT_DIRECTIVE, NOANNOTATIONS, NOBUILDINCACHE, NOBUNDLES, NOCLASSFORNAME, NODEFAULTVERSION, NOEE, NOEXTRAHEADERS, NOIMPORTJAVA, NOJUNIT, NOJUNITOSGI, NOMANIFEST, NONE, NOT_A_BUNDLE_S, NOUSES, OPTIONAL, options, OSGI_SYNTAX_HEADERS, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, OUTPUT, OUTPUTMASK, PACKAGE, PACKAGEINFOTYPE, 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, REMOTEWORKSPACE, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVEHEADERS, REPORTNEWER, REPOSITORIES, REPRODUCIBLE, REQUIRE_BND, REQUIRE_BUNDLE, REQUIRE_CAPABILITY, RESOLUTION, RESOLUTION_DIRECTIVE, RESOLUTION_DYNAMIC, RESOLVE, RESOURCEONLY, RUNBLACKLIST, RUNBUILDS, RUNBUNDLES, RUNBUNDLES_STARTLEVEL_ATTRIBUTE, RUNEE, RUNENV, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNFRAMEWORKRESTART, RUNFW, RUNJDB, RUNKEEP, RUNNOREFERENCES, RUNOPTIONS, RUNOPTIONS_EAGER, RUNPATH, RUNPATH_LAUNCHER_DIRECTIVE, RUNPATH_MAIN_DIRECTIVE, RUNPROGRAMARGS, RUNPROPERTIES, RUNPROVIDEDCAPABILITIES, RUNREMOTE, RUNREPOS, RUNREQUIRE, RUNREQUIRES, RUNSTARTLEVEL, RUNSTARTLEVEL_BEGIN, RUNSTARTLEVEL_ORDER, RUNSTARTLEVEL_STEP, RUNSTORAGE, RUNSYSTEMCAPABILITIES, RUNSYSTEMPACKAGES, RUNTIMEOUT, RUNTRACE, RUNVM, SAVEMANIFEST, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SERVICELOADER_NAMESPACE, SERVICELOADER_REGISTER_DIRECTIVE, 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, STALECHECK, STANDALONE, STATIC_ATTRIBUTE, STRICT, SUB, SUBSTITUTE_ATTRIBUTE, SYSTEMPROPERTIES, TESTCASES, TESTCONTINUOUS, TESTER, TESTER_PLUGIN, TESTPACKAGES, TESTPATH, TESTREPORT, TESTSOURCES, TESTSUITES, TESTUNRESOLVED, TOOL, TRANSITIVE_ATTRIBUTE, TSTAMP, UNDERTEST, UPTO, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTR_HASH, VERSION_ATTR_LATEST, VERSION_ATTR_PROJECT, VERSION_ATTR_SNAPSHOT, VERSION_ATTRIBUTE, VERSION_FILTER, VISIBILITY_DIRECTIVE, WAB, WABLIB, WORKINGSET, WORKINGSET_MEMBER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_exporters
(String[] args) Get the exporter of a package ...Findpath looks through the contents of the JAR and finds paths that end with the given regular expression ${findpath (; reg-expr (; replacement)? )? }_packageattribute
(String[] args) Return an attribute of a packagevoid
addClasspath
(Jar jar) void
addClasspath
(File cp) void
addClasspath
(Collection<?> jars) void
analyze()
Calculates the data structures for generating a manifest.boolean
assignable
(Clazz annoServiceClazz, Clazz inferredServiceClazz) boolean
assignable
(Clazz annoServiceClazz, Clazz inferredServiceClazz, boolean unknownResult) boolean
assignable
(String annoService, String inferredService) boolean
assignable
(String annoService, String inferredService, boolean unknownResult) protected void
begin()
One of the main workhorses of this class.calculateExportsFromContents
(Jar bundle) Calculate an export header solely based on the contents of a JAR fileboolean
check
(Analyzer.Check key) Check if we have an a check optioncleanupUses
(Map<Descriptors.PackageRef, List<Descriptors.PackageRef>> apiUses, boolean removeJava) Remove the own references and optional java references from the uses libstatic String
cleanupVersion
(String version) void
clear()
void
close()
protected void
Ensure that we are running on the correct bnd.protected void
doUses
(Descriptors.PackageRef packageRef, Packages exports, Map<Descriptors.PackageRef, List<Descriptors.PackageRef>> uses, Packages imports) findClass
(Descriptors.TypeRef typeRef) Find a clazz on the class path.findClasspathEntry
(String bsn, String r) Find a class path entry based on bsn and versionrangefindResource
(String path) Locate a resource on the class path.findResources
(Predicate<String> matches) void
getBndInfo
(String key, String defaultValue) long
Get the version for this bndgetBsn()
Clear the key part of a header.getBundleClassPathEntry
(Clazz clazz) getClasses
(String... args) getClassSignature
(String signature) getClassspace
(Descriptors.PackageRef source) Return the classes for a given source package.getDescriptor
(String descriptor) getEEs()
Return the EEsprotected Jar
getExtra()
getFieldSignature
(String signature) Get the packages from the host if this is a fragment bundlegetJar()
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.getJarsFromName
(String name, String from) static Properties
getManifest
(File dirOrJar) Specifically for MavengetMethodSignature
(String signature) protected String
getOutputFile
(String output) Calculate the output file for the given target.getPackageInfo
(Descriptors.PackageRef packageRef) getPackageRef
(String binaryName) getPackages
(Packages scope, String... args) Find the packages belonging to the required bundlesFind the source file for this typegetSourceFileFor
(Descriptors.TypeRef type, Collection<File> sourcePath) getTypeRef
(String binaryClassName) getTypeRefFromFQN
(String fqn) getTypeRefFromPath
(String path) Return the set of unreachable code depending on exports and the bundle activator.getUses()
Answer the bundle version.getVersionPolicy
(boolean implemented) getXRef
(Descriptors.PackageRef source, Collection<Descriptors.PackageRef> dest, int sourceModifiers) Create a cross reference from package source, to packages in destboolean
isImported
(Descriptors.PackageRef packageRef) boolean
void
mergeManifest
(Manifest manifest) Merge the existing manifest with the instructions but do not override existing properties.void
void
boolean
referred
(Descriptors.PackageRef packageName) void
void
referToByBinaryName
(String binaryClassName) void
Report the details of this analyzerboolean
Utility function to carefully save the file.void
void
setClasspath
(Jar[] classpath) void
setClasspath
(File[] classpath) void
setClasspath
(String[] classpath) void
setClasspath
(Collection<?> classpath) Set the classpath for this analyzer by file.void
setDefaults
(String bsn, Version version) Set default import and export instructions if none are setvoid
setDiagnostics
(boolean b) Set the JAR directly we are going to work on.Set the JAR file we are going to work in.void
setTypeLocation
(aQute.service.reporter.Reporter.SetLocation location, Descriptors.TypeRef type) Set location information for a type.protected void
setTypeSpecificPlugins
(Set<Object> list) validResourcePath
(String name, String reportIfWrong) Methods inherited from class aQute.bnd.osgi.Processor
_basedir, _fileuri, _findfile, _frange, _native_capability, _propertiesdir, _propertiesname, _random, _thisfile, _uri, addBasicPlugin, addClose, addExtensions, addIncluded, addProperties, addProperties, append, appendPath, beginHandleErrors, check, concat, customize, decorated, decorated, doAttrbutes, doIncludeFile, doIncludeFile, endHandleErrors, error, error, exception, exists, findHeader, findHeader, findHeader, formatArrays, get, get, getBase, getBaseURI, getChecksum, getClass, getDuration, getErrors, getExecutor, getFile, getFile, getFlattenedProperties, getFlattenedProperties, getHeader, getHeader, getHeader, getHeader, getIncluded, getInfo, getInfo, getInstructions, getJavaExecutable, getLine, getLoader, getLocation, getLogger, getMacroDomains, getManifestAsProperties, getMergedParameters, getParameters, getParent, getPlugin, getPlugins, getPlugins, getProfile, getPromiseFactory, getProperties, getPropertiesFile, getProperty, getProperty, getProperty, getPropertyKeys, getReplacer, getScheduledExecutor, getSelfAndAncestors, getSettings, getTop, getUnexpandedProperty, getUnprocessedProperty, getWarnings, is, isDuplicate, isExceptions, isFailOk, isInteractive, isMissingPlugin, isOk, isPedantic, isPerfect, isTrace, isTrue, iterator, join, join, join, join, join, join, keySet, lastModified, loadPlugins, loadProperties, makePrintable, merge, mergeLocalProperties, 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, setLocation, setParent, setPedantic, setProperties, setProperties, setProperties, setProperties, setProperty, setTrace, signal, since, split, split, split, spliterator, system, system, toFullHeaderPattern, toString, trace, unsetProperty, updateModified, use, warning
Methods inherited from class aQute.bnd.osgi.Domain
copyFrom, domain, domain, domain, domain, domain, domain, domain, getBundleActivator, getBundleCategory, getBundleClasspath, getBundleClassPath, getBundleContactAddress, getBundleCopyright, getBundleDescription, getBundleDocURL, getBundleName, getBundleNative, getBundleRequiredExecutionEnvironment, getBundleSymbolicName, getBundleVendor, getBundleVersion, getDynamicImportPackage, getExportContents, getExportPackage, getFragmentHost, getIcon, getImportPackage, getIncludeResource, getParameters, getParameters, getParameters, getParameters, getPrivatePackage, getProvideCapability, getRequireBundle, getRequireCapability, getRunblacklist, getRunee, isSources, normalizeKey, setAugment, setBundleActivator, setBundleClasspath, setBundleRequiredExecutionEnvironment, setBundleSymbolicName, setBundleVersion, setBundleVersion, setConditionalPackage, setExportContents, setExportPackage, setFailOk, setImportPackage, setIncludePackage, setIncludeResource, setPrivatePackage, setRunblacklist, setRunee, setRunfw, setRunRequires, setSources, setTranslation, translate, translate
-
Field Details
-
msgs
-
-
Constructor Details
-
Analyzer
- Throws:
Exception
-
Analyzer
-
Analyzer
public Analyzer()
-
-
Method Details
-
setTypeSpecificPlugins
- Overrides:
setTypeSpecificPlugins
in classProcessor
-
getManifest
Specifically for Maven- Throws:
Exception
-
analyze
Calculates the data structures for generating a manifest.- Throws:
IOException
Exception
-
getHostPackages
Get the packages from the host if this is a fragment bundle- Returns:
- the host packages or an empty set if not a fragment
-
getRequireBundlePackages
Find the packages belonging to the required bundles- Returns:
- the packages from the required bundles, with no Require-Bundle return an empty Optional
-
getPackageInfo
-
getName
- Throws:
Exception
-
getExtra
- Throws:
Exception
-
calcManifest
One of the main workhorses of this class. This will analyze the current setup and calculate a new manifest according to this setup.- Throws:
IOException
Exception
-
findClasspathEntry
Find a class path entry based on bsn and versionrange- Parameters:
bsn
- The bundle symbolic namer
- The version range specified like in OSGi (version => [version,infinite))- Returns:
- first JAR that matches bsn &r or null if not found
-
getBsn
Clear the key part of a header. I.e. remove everything from the first ';' -
_bsn
-
calculateExportsFromContents
Calculate an export header solely based on the contents of a JAR file- Parameters:
bundle
- The jar file to analyze
-
getContained
-
getExports
-
getImports
-
getPrivates
-
getJar
-
getReferred
-
getUnreachable
Return the set of unreachable code depending on exports and the bundle activator. -
getUses
-
getAPIUses
-
getClasspathExports
-
getBndVersion
Get the version for this bnd- Returns:
- version or unknown.
-
getBndLastModified
public long getBndLastModified() -
getBndInfo
-
mergeManifest
Merge the existing manifest with the instructions but do not override existing properties.- Parameters:
manifest
- The manifest to merge with- Throws:
IOException
-
setBase
-
setClasspath
Set the classpath for this analyzer by file.- Parameters:
classpath
-- Throws:
IOException
-
setClasspath
- Throws:
IOException
-
setClasspath
-
setClasspath
-
setJar
Set the JAR file we are going to work in. This will read the JAR in memory.- Parameters:
file
-- Throws:
IOException
-
setJar
Set the JAR directly we are going to work on.- Parameters:
jar
-
-
begin
protected void begin() -
getJarFromName
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 classProcessor
- Parameters:
name
- URL or filename relative to the basefrom
- Message identifying the caller for errors- Returns:
- null or a Jar with the contents for the name
-
getJarsFromName
-
referred
-
doUses
protected void doUses(Descriptors.PackageRef packageRef, Packages exports, Map<Descriptors.PackageRef, List<Descriptors.PackageRef>> uses, Packages imports) - Parameters:
packageRef
-exports
-uses
-imports
-
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classProcessor
- Throws:
IOException
-
_findpath
Findpath looks through the contents of the JAR and finds paths that end with the given regular expression ${findpath (; reg-expr (; replacement)? )? }- Parameters:
args
-
-
_findname
-
putAll
-
getClasspath
-
addClasspath
-
addClasspath
- Throws:
IOException
-
addClasspath
- Throws:
IOException
-
clear
public void clear() -
forceRefresh
public void forceRefresh()- Overrides:
forceRefresh
in classProcessor
-
getTarget
-
cleanupVersion
-
getVersionPolicy
-
_classes
- Throws:
Exception
-
getClasses
- Throws:
Exception
-
_packages
- Throws:
Exception
-
getPackages
public Collection<Descriptors.PackageRef> getPackages(Packages scope, String... args) throws Exception - Throws:
Exception
-
_exporters
Get the exporter of a package ...- Throws:
Exception
-
getClassspace
-
_packageattribute
Return an attribute of a package -
findResource
Locate a resource on the class path.- Parameters:
path
- Path of the reosurce- Returns:
- A resource or
null
-
findResources
-
findClass
Find a clazz on the class path. This class has been parsed.- Throws:
Exception
-
getVersion
Answer the bundle version. -
isNoBundle
public boolean isNoBundle() -
referTo
-
nonClassReferTo
-
referToByBinaryName
-
doRequireBnd
protected void doRequireBnd()Ensure that we are running on the correct bnd. -
_md5
- Throws:
Exception
-
_sha1
- Throws:
Exception
-
getDescriptor
-
getTypeRef
-
getPackageRef
-
getTypeRefFromFQN
-
getTypeRefFromPath
-
getClassSignature
-
getMethodSignature
-
getFieldSignature
-
isImported
-
setDiagnostics
public void setDiagnostics(boolean b) -
getLowestEE
-
getHighestEE
-
_ee
-
getOutputFile
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
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 nullgetOutputFile(String)
is used.force
- if it needs to be overwritten- Throws:
Exception
-
setDefaults
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
-
-
getClassspace
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
-- Throws:
Exception
-
_exports
-
_imports
-
report
Report the details of this analyzer -
getEEs
Return the EEs -
validResourcePath
- Parameters:
name
-
-
check
Check if we have an a check option -
getSourceFileFor
Find the source file for this type- Parameters:
type
-- Throws:
Exception
-
getSourceFileFor
public String getSourceFileFor(Descriptors.TypeRef type, Collection<File> sourcePath) throws Exception - Throws:
Exception
-
setTypeLocation
public void setTypeLocation(aQute.service.reporter.Reporter.SetLocation location, Descriptors.TypeRef type) throws Exception Set location information for a type.- Throws:
Exception
-
assignable
-
assignable
-
assignable
-
assignable
-
getBundleClassPathEntry
-