Class BundleDescriptorImpl
- java.lang.Object
-
- org.apache.sling.feature.scanner.Descriptor
-
- org.apache.sling.feature.scanner.ArtifactDescriptor
-
- org.apache.sling.feature.scanner.BundleDescriptor
-
- org.apache.sling.feature.scanner.impl.BundleDescriptorImpl
-
- All Implemented Interfaces:
java.lang.Comparable<BundleDescriptor>
public class BundleDescriptorImpl extends BundleDescriptor
Information about a bundle
-
-
Constructor Summary
Constructors Constructor Description BundleDescriptorImpl(org.apache.sling.feature.Artifact a, java.net.URL file, int startLevel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidanalyze()static java.util.List<PackageInfo>extractDynamicImportedPackages(java.util.jar.Manifest m)static java.util.List<PackageInfo>extractExportedPackages(java.util.jar.Manifest m)static java.util.List<PackageInfo>extractImportedPackages(java.util.jar.Manifest m)static java.util.List<PackageInfo>extractPackages(java.util.jar.Manifest m, java.lang.String headerName, java.lang.String defaultVersion, boolean checkOptional)org.apache.sling.feature.ArtifactgetArtifact()Get the artifactjava.net.URLgetArtifactFile()Get the artifact fileintgetBundleStartLevel()Get the start leveljava.lang.StringgetBundleSymbolicName()Get the bundle symbolic name.java.lang.StringgetBundleVersion()Get the bundle versionjava.util.jar.ManifestgetManifest()If the artifact has a manifest, return it-
Methods inherited from class org.apache.sling.feature.scanner.BundleDescriptor
compareTo, equals, hashCode, isExportingPackage, isExportingPackage, toString
-
Methods inherited from class org.apache.sling.feature.scanner.Descriptor
aggregate, checkLocked, getCapabilities, getDynamicImportedPackages, getExportedPackages, getImportedPackages, getName, getRequirements, isLocked, lock
-
-
-
-
Method Detail
-
getBundleSymbolicName
public java.lang.String getBundleSymbolicName()
Get the bundle symbolic name.- Specified by:
getBundleSymbolicNamein classBundleDescriptor- Returns:
- The bundle symbolic name
-
getBundleVersion
public java.lang.String getBundleVersion()
Get the bundle version- Specified by:
getBundleVersionin classBundleDescriptor- Returns:
- The bundle version
-
getBundleStartLevel
public int getBundleStartLevel()
Get the start level- Specified by:
getBundleStartLevelin classBundleDescriptor- Returns:
- The start level or
0for the default.
-
getArtifactFile
public java.net.URL getArtifactFile()
Description copied from class:ArtifactDescriptorGet the artifact file- Specified by:
getArtifactFilein classArtifactDescriptor- Returns:
- The artifact file
-
getArtifact
public org.apache.sling.feature.Artifact getArtifact()
Description copied from class:ArtifactDescriptorGet the artifact- Specified by:
getArtifactin classArtifactDescriptor- Returns:
- The artifact
-
getManifest
public java.util.jar.Manifest getManifest()
Description copied from class:BundleDescriptorIf the artifact has a manifest, return it- Specified by:
getManifestin classBundleDescriptor- Returns:
- The manifest
-
analyze
protected void analyze() throws java.io.IOException- Throws:
java.io.IOException
-
extractPackages
public static java.util.List<PackageInfo> extractPackages(java.util.jar.Manifest m, java.lang.String headerName, java.lang.String defaultVersion, boolean checkOptional)
-
extractExportedPackages
public static java.util.List<PackageInfo> extractExportedPackages(java.util.jar.Manifest m)
-
extractImportedPackages
public static java.util.List<PackageInfo> extractImportedPackages(java.util.jar.Manifest m)
-
extractDynamicImportedPackages
public static java.util.List<PackageInfo> extractDynamicImportedPackages(java.util.jar.Manifest m)
-
-