public final class BundleDescriptionImpl extends BaseDescriptionImpl implements BundleDescription, KeyedElement
monitorBUNDLE_NAMESPACE, HOST_NAMESPACE, PACKAGE_NAMESPACE, TYPE_FRAGMENT| Constructor and Description |
|---|
BundleDescriptionImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDependencies(BaseDescription[] newDependencies,
boolean checkDups) |
protected void |
addDependency(BaseDescriptionImpl dependency,
boolean checkDups) |
protected void |
addDependent(BundleDescription dependent) |
boolean |
attachFragments()
Returns true if this bundle allows fragments to attach
|
boolean |
compare(KeyedElement other)
Compares this element with a specified element
|
boolean |
dynamicFragments()
Returns true if this bundle allows fragments to attach dynamically
after it has been resolved.
|
ImportPackageSpecification[] |
getAddedDynamicImportPackages()
Returns an array of dynamic import package specifications that have been added
dynamically to this bundle description.
|
Map<String,Object> |
getAttributes()
Returns the arbitrary attributes for this bundle description.
|
Bundle |
getBundle()
Returns the
Bundle object associated with this
BundleReference. |
long |
getBundleId()
Returns the numeric id of this bundle.
|
List<Capability> |
getCapabilities(String namespace)
Returns the capabilities declared by this resource.
|
State |
getContainingState()
Returns the state object which hosts this bundle.
|
Map<String,Object> |
getDeclaredAttributes()
Returns the attributes declared with the description.
|
List<BundleCapability> |
getDeclaredCapabilities(String namespace)
Returns the capabilities declared by this bundle revision.
|
Map<String,String> |
getDeclaredDirectives()
Returns the directives declared with the description.
|
List<BundleRequirement> |
getDeclaredRequirements(String namespace)
Returns the requirements declared by this bundle revision.
|
BundleDescription[] |
getDependents()
Returns all bundles which depend on this bundle.
|
int |
getEquinoxEE() |
String[] |
getExecutionEnvironments()
Returns the list of execution environments that are required by
this bundle.
|
ExportPackageDescription[] |
getExportPackages()
Returns an array of export package descriptions defined by the Export-Package clauses.
|
BundleDescription[] |
getFragments()
Returns all fragments known to this bundle (regardless resolution status).
|
GenericDescription[] |
getGenericCapabilities()
Returns an array of generic descriptions for the capabilities of this bundle.
|
GenericSpecification[] |
getGenericRequires()
Returns an array of generic specifications constraints required by this bundle.
|
HostSpecification |
getHost()
Returns the host for this bundle.
|
ImportPackageSpecification[] |
getImportPackages()
Returns an array of import package specifications defined by the Import-Package clause.
|
Object |
getKey()
Returns the key for this element
|
int |
getKeyHashCode()
Returns the hash code of the key
|
String |
getLocation()
The location string for this bundle.
|
NativeCodeSpecification |
getNativeCodeSpecification()
Returns the native code specification for this bundle.
|
String |
getPlatformFilter()
Returns the platform filter in the form of an LDAP filter
|
BundleSpecification[] |
getRequiredBundles()
Returns an array of bundle specifications defined by the Require-Bundle
clause in this bundle.
|
List<Requirement> |
getRequirements(String namespace)
Returns the requirements declared by this bundle resource.
|
GenericDescription[] |
getResolvedGenericRequires()
Returns all the capabilities that satisfy all the capability requirements for this
bundle.
|
ExportPackageDescription[] |
getResolvedImports()
Returns all the export packages that satisfy all the imported packages for this bundle.
|
BundleDescription[] |
getResolvedRequires()
Returns all the bundle descriptions that satisfy all the require bundles for this bundle.
|
ExportPackageDescription[] |
getSelectedExports()
Returns all the exported packages from this bundle that have been selected by
the resolver.
|
GenericDescription[] |
getSelectedGenericCapabilities()
Returns all the capabilities provided by ths bundle that have been selected by
the resolver.
|
protected int |
getStateBits() |
ExportPackageDescription[] |
getSubstitutedExports()
Returns the export packages that satisfy imported packages for this bundle description
and substitute one of the exports for this bundle description.
|
BundleDescription |
getSupplier()
Returns the bundle which supplies this base description
|
String |
getSymbolicName()
Gets the Bundle-SymbolicName of this BundleDescription.
|
int |
getTypes()
Returns the special types of this bundle revision.
|
Map<String,List<StateWire>> |
getWires() |
BundleWiring |
getWiring()
Returns the bundle wiring which is using this bundle revision.
|
boolean |
hasDynamicImports()
Returns true if this bundle has one or more dynamically imported packages.
|
boolean |
isRemovalPending()
Returns whether this bundle is pending a removal.
|
boolean |
isResolved()
Returns true if this bundle is resolved in its host state.
|
boolean |
isSingleton()
Returns whether this bundle is a singleton.
|
protected void |
removeDependencies() |
protected void |
removeDependent(BundleDescription dependent) |
protected void |
setBundleId(long bundleId) |
protected void |
setContainingState(State value) |
void |
setEquinoxEE(int equinox_ee) |
protected void |
setExecutionEnvironments(String[] executionEnvironments) |
protected void |
setExportPackages(ExportPackageDescription[] exportPackages) |
protected void |
setGenericCapabilities(GenericDescription[] genericCapabilities) |
protected void |
setGenericRequires(GenericSpecification[] genericRequires) |
protected void |
setHost(HostSpecification host) |
protected void |
setImportPackages(ImportPackageSpecification[] importPackages) |
protected void |
setLazyLoaded(boolean lazyLoad) |
protected void |
setLocation(String location) |
protected void |
setNativeCodeSpecification(NativeCodeSpecification nativeCode) |
protected void |
setPlatformFilter(String platformFilter) |
protected void |
setRequiredBundles(BundleSpecification[] requiredBundles) |
protected void |
setResolvedCapabilities(GenericDescription[] resolvedCapabilities) |
protected void |
setResolvedImports(ExportPackageDescription[] resolvedImports) |
protected void |
setResolvedRequires(BundleDescription[] resolvedRequires) |
protected void |
setSelectedCapabilities(GenericDescription[] selectedCapabilities) |
protected void |
setSelectedExports(ExportPackageDescription[] selectedExports) |
protected void |
setStateBit(int stateBit,
boolean on) |
protected void |
setStateWires(Map<String,List<StateWire>> stateWires) |
protected void |
setSubstitutedExports(ExportPackageDescription[] substitutedExports) |
protected void |
setSymbolicName(String symbolicName) |
String |
toString()
Returns the string representation of this bundle.
|
getCapability, getFragmentDeclaration, getName, getUserObject, getVersion, setName, setUserObject, setVersionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCapability, getName, getUserObject, getVersion, setUserObjectgetVersionpublic long getBundleId()
BundleDescriptiongetBundleId in interface BundleDescriptionpublic String getSymbolicName()
BundleDescriptionBaseDescription.getName().getSymbolicName in interface BundleDescriptiongetSymbolicName in interface BundleRevisionBundle.getSymbolicName()public BundleDescription getSupplier()
BaseDescriptiongetSupplier in interface BaseDescriptionpublic String getLocation()
BundleDescriptiongetLocation in interface BundleDescriptionpublic String getPlatformFilter()
BundleDescriptiongetPlatformFilter in interface BundleDescriptionpublic String[] getExecutionEnvironments()
BundleDescriptiongetExecutionEnvironments in interface BundleDescriptionpublic ImportPackageSpecification[] getImportPackages()
BundleDescriptiongetImportPackages in interface BundleDescriptionpublic ImportPackageSpecification[] getAddedDynamicImportPackages()
BundleDescriptiongetAddedDynamicImportPackages in interface BundleDescriptionState.addDynamicImportPackages(BundleDescription, ImportPackageSpecification[])public BundleSpecification[] getRequiredBundles()
BundleDescriptiongetRequiredBundles in interface BundleDescriptionpublic GenericSpecification[] getGenericRequires()
BundleDescriptiongetGenericRequires in interface BundleDescriptionpublic GenericDescription[] getGenericCapabilities()
BundleDescriptiongetGenericCapabilities in interface BundleDescriptionpublic NativeCodeSpecification getNativeCodeSpecification()
BundleDescriptionnull is returned if there is no native code
specification.getNativeCodeSpecification in interface BundleDescriptionpublic ExportPackageDescription[] getExportPackages()
BundleDescriptiongetExportPackages in interface BundleDescriptionpublic boolean isResolved()
BundleDescriptionisResolved in interface BundleDescriptionpublic State getContainingState()
BundleDescriptiongetContainingState in interface BundleDescriptionpublic BundleDescription[] getFragments()
BundleDescriptiongetFragments in interface BundleDescriptionpublic HostSpecification getHost()
BundleDescriptiongetHost in interface BundleDescriptionpublic boolean isSingleton()
BundleDescriptionThe existence of a single bundle marked as singleton causes all bundles with the same symbolic name to be treated as singletons as well.
isSingleton in interface BundleDescriptiontrue, if this bundle is a singleton,
false otherwisepublic boolean isRemovalPending()
BundleDescriptionisRemovalPending in interface BundleDescriptiontrue, if this bundle is pending a removal,
false otherwisepublic boolean hasDynamicImports()
BundleDescriptionhasDynamicImports in interface BundleDescriptionpublic boolean attachFragments()
BundleDescriptionattachFragments in interface BundleDescriptionpublic boolean dynamicFragments()
BundleDescriptiondynamicFragments in interface BundleDescriptionpublic ExportPackageDescription[] getSelectedExports()
BundleDescriptionBundleDescription.getExportPackages() that have been selected by the resolver and
packages which are propagated by this bundle.getSelectedExports in interface BundleDescriptionpublic GenericDescription[] getSelectedGenericCapabilities()
BundleDescriptionBundleDescription.getGenericCapabilities() that have been selected by the
resolver and any capabilities provided by fragments attached to this bundle.getSelectedGenericCapabilities in interface BundleDescriptionpublic ExportPackageDescription[] getSubstitutedExports()
BundleDescriptiongetSubstitutedExports in interface BundleDescriptionpublic BundleDescription[] getResolvedRequires()
BundleDescriptiongetResolvedRequires in interface BundleDescriptionpublic ExportPackageDescription[] getResolvedImports()
BundleDescriptiongetResolvedImports in interface BundleDescriptionpublic GenericDescription[] getResolvedGenericRequires()
BundleDescriptiongetResolvedGenericRequires in interface BundleDescriptionprotected void setBundleId(long bundleId)
protected void setSymbolicName(String symbolicName)
protected void setLocation(String location)
protected void setPlatformFilter(String platformFilter)
protected void setExecutionEnvironments(String[] executionEnvironments)
protected void setExportPackages(ExportPackageDescription[] exportPackages)
protected void setImportPackages(ImportPackageSpecification[] importPackages)
protected void setRequiredBundles(BundleSpecification[] requiredBundles)
protected void setGenericCapabilities(GenericDescription[] genericCapabilities)
protected void setGenericRequires(GenericSpecification[] genericRequires)
protected void setNativeCodeSpecification(NativeCodeSpecification nativeCode)
protected int getStateBits()
protected void setStateBit(int stateBit,
boolean on)
protected void setContainingState(State value)
protected void setHost(HostSpecification host)
protected void setLazyLoaded(boolean lazyLoad)
protected void setSelectedExports(ExportPackageDescription[] selectedExports)
protected void setSelectedCapabilities(GenericDescription[] selectedCapabilities)
protected void setSubstitutedExports(ExportPackageDescription[] substitutedExports)
protected void setResolvedImports(ExportPackageDescription[] resolvedImports)
protected void setResolvedRequires(BundleDescription[] resolvedRequires)
protected void setResolvedCapabilities(GenericDescription[] resolvedCapabilities)
public String toString()
BundleDescriptiontoString in interface BundleDescriptiontoString in class Objectpublic Object getKey()
KeyedElementgetKey in interface KeyedElementpublic boolean compare(KeyedElement other)
KeyedElementcompare in interface KeyedElementother - the element to compare withpublic int getKeyHashCode()
KeyedElementgetKeyHashCode in interface KeyedElementprotected void removeDependencies()
protected void addDependencies(BaseDescription[] newDependencies, boolean checkDups)
protected void addDependency(BaseDescriptionImpl dependency, boolean checkDups)
protected void addDependent(BundleDescription dependent)
protected void removeDependent(BundleDescription dependent)
public BundleDescription[] getDependents()
BundleDescriptiongetDependents in interface BundleDescriptionpublic void setEquinoxEE(int equinox_ee)
public int getEquinoxEE()
public Map<String,Object> getAttributes()
BundleDescriptiongetAttributes in interface BundleDescriptionpublic Map<String,String> getDeclaredDirectives()
BaseDescriptiongetDeclaredDirectives in interface BaseDescriptionpublic Map<String,Object> getDeclaredAttributes()
BaseDescriptiongetDeclaredAttributes in interface BaseDescriptionpublic List<BundleRequirement> getDeclaredRequirements(String namespace)
BundleRevisiongetDeclaredRequirements in interface BundleRevisionnamespace - The namespace of the declared requirements to return or
null to return the declared requirements from all
namespaces.BundleRequirements from the specified namespace. The
returned list will be empty if this bundle revision declares no
requirements in the specified namespace. The list contains the
declared requirements in the order they are specified in the
manifest.public List<BundleCapability> getDeclaredCapabilities(String namespace)
BundleRevisiongetDeclaredCapabilities in interface BundleRevisionnamespace - The namespace of the declared capabilities to return or
null to return the declared capabilities from all
namespaces.BundleCapabilitys from the specified namespace. The
returned list will be empty if this bundle revision declares no
capabilities in the specified namespace. The list contains the
declared capabilities in the order they are specified in the
manifest.public int getTypes()
BundleRevisionIf this bundle revision is not one or more of the defined types then 0 is returned.
getTypes in interface BundleRevisionpublic Bundle getBundle()
BundleReferenceBundle object associated with this
BundleReference.getBundle in interface BundleReferenceBundle object associated with this
BundleReference.public BundleWiring getWiring()
BundleRevisiongetWiring in interface BundleRevisionnull if no bundle wiring is using this bundle revision.BundleWiring.getRevision()public List<Capability> getCapabilities(String namespace)
BundleRevision
This method returns the same value as
BundleRevision.getDeclaredCapabilities(String).
getCapabilities in interface BundleRevisiongetCapabilities in interface Resourcenamespace - The namespace of the declared capabilities to return or
null to return the declared capabilities from all
namespaces.Capabilitys
from the specified namespace. The returned list will be empty if
this resource declares no capabilities in the specified
namespace.public List<Requirement> getRequirements(String namespace)
BundleRevision
This method returns the same value as
BundleRevision.getDeclaredRequirements(String).
getRequirements in interface BundleRevisiongetRequirements in interface Resourcenamespace - The namespace of the declared requirements to return or
null to return the declared requirements from all
namespaces.Requirement
s from the specified namespace. The returned list will be empty
if this resource declares no requirements in the specified
namespace.Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.