Package org.apache.sling.feature.scanner

# Class BundleDescriptor

java.lang.Object
org.apache.sling.feature.scanner.Descriptor
org.apache.sling.feature.scanner.ArtifactDescriptor
org.apache.sling.feature.scanner.BundleDescriptor

All Implemented Interfaces:
  `Comparable<BundleDescriptor>`

public abstract class BundleDescriptor extends ArtifactDescriptor implements Comparable<BundleDescriptor>
Information about a bundle. Note that this implementation is not synchronized. If multiple threads access a descriptor concurrently, and at least one of the threads modifies the descriptor structurally, it must be synchronized externally. However, once a descriptor is locked, it is safe to access it concurrently.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`BundleDescriptor(String name)`
Constructor for a new descriptor

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(BundleDescriptor o)`
`boolean`
`equals(Object obj)`
`abstract String`
`getBundleSymbolicName()`
Get the bundle symbolic name.
`abstract String`
`getBundleVersion()`
Get the bundle version
`abstract Manifest`
`getManifest()`
Return the bundle manifest
`int`
`hashCode()`
`boolean`
`isExportingPackage(String packageName)`
Is the bundle exporting a package?
`boolean`
`isExportingPackage(PackageInfo info)`
Is the bundle exporting a package?
`String`
`toString()`

### Methods inherited from class org.apache.sling.feature.scanner.ArtifactDescriptor

`getArtifact, getArtifactFile`

### Methods inherited from class org.apache.sling.feature.scanner.Descriptor

`aggregate, checkLocked, getCapabilities, getCapabilities, getDynamicImportedPackages, getExportedPackages, getExportedPackages, getImportedPackages, getName, getRequirements, isLocked, lock`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### BundleDescriptor

protected BundleDescriptor(String name)
Constructor for a new descriptor

Parameters:
  `name` - The name
Throws:
  `IllegalArgumentException` - if name is `null`

## Method Details

### getBundleSymbolicName

public abstract String getBundleSymbolicName()
Get the bundle symbolic name.

Returns:
  The bundle symbolic name

### getBundleVersion

public abstract String getBundleVersion()
Get the bundle version

Returns:
  The bundle version

### getManifest

public abstract Manifest getManifest()
Return the bundle manifest

Specified by:
  `getManifest` in class `ArtifactDescriptor`
Returns:
  The manifest

### isExportingPackage

public boolean isExportingPackage(String packageName)
Is the bundle exporting a package?

Parameters:
  `packageName` - Package name
Returns:
  `true` if that package is exported.

### isExportingPackage

public boolean isExportingPackage(PackageInfo info)
Is the bundle exporting a package?

Parameters:
  `info` - Package info
Returns:
  `true` if that package is exported.

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Descriptor`

### compareTo

public int compareTo(BundleDescriptor o)

Specified by:
  `compareTo` in interface `Comparable<BundleDescriptor>`