public final class BundleDescriptionImpl extends BaseDescriptionImpl implements BundleDescription, KeyedElement
monitor
BUNDLE_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, setVersion
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCapability, getName, getUserObject, getVersion, setUserObject
getVersion
public long getBundleId()
BundleDescription
getBundleId
in interface BundleDescription
public String getSymbolicName()
BundleDescription
BaseDescription.getName()
.getSymbolicName
in interface BundleDescription
getSymbolicName
in interface BundleRevision
Bundle.getSymbolicName()
public BundleDescription getSupplier()
BaseDescription
getSupplier
in interface BaseDescription
public String getLocation()
BundleDescription
getLocation
in interface BundleDescription
public String getPlatformFilter()
BundleDescription
getPlatformFilter
in interface BundleDescription
public String[] getExecutionEnvironments()
BundleDescription
getExecutionEnvironments
in interface BundleDescription
public ImportPackageSpecification[] getImportPackages()
BundleDescription
getImportPackages
in interface BundleDescription
public ImportPackageSpecification[] getAddedDynamicImportPackages()
BundleDescription
getAddedDynamicImportPackages
in interface BundleDescription
State.addDynamicImportPackages(BundleDescription, ImportPackageSpecification[])
public BundleSpecification[] getRequiredBundles()
BundleDescription
getRequiredBundles
in interface BundleDescription
public GenericSpecification[] getGenericRequires()
BundleDescription
getGenericRequires
in interface BundleDescription
public GenericDescription[] getGenericCapabilities()
BundleDescription
getGenericCapabilities
in interface BundleDescription
public NativeCodeSpecification getNativeCodeSpecification()
BundleDescription
null
is returned if there is no native code
specification.getNativeCodeSpecification
in interface BundleDescription
public ExportPackageDescription[] getExportPackages()
BundleDescription
getExportPackages
in interface BundleDescription
public boolean isResolved()
BundleDescription
isResolved
in interface BundleDescription
public State getContainingState()
BundleDescription
getContainingState
in interface BundleDescription
public BundleDescription[] getFragments()
BundleDescription
getFragments
in interface BundleDescription
public HostSpecification getHost()
BundleDescription
getHost
in interface BundleDescription
public boolean isSingleton()
BundleDescription
The 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 BundleDescription
true
, if this bundle is a singleton,
false
otherwisepublic boolean isRemovalPending()
BundleDescription
isRemovalPending
in interface BundleDescription
true
, if this bundle is pending a removal,
false
otherwisepublic boolean hasDynamicImports()
BundleDescription
hasDynamicImports
in interface BundleDescription
public boolean attachFragments()
BundleDescription
attachFragments
in interface BundleDescription
public boolean dynamicFragments()
BundleDescription
dynamicFragments
in interface BundleDescription
public ExportPackageDescription[] getSelectedExports()
BundleDescription
BundleDescription.getExportPackages()
that have been selected by the resolver and
packages which are propagated by this bundle.getSelectedExports
in interface BundleDescription
public GenericDescription[] getSelectedGenericCapabilities()
BundleDescription
BundleDescription.getGenericCapabilities()
that have been selected by the
resolver and any capabilities provided by fragments attached to this bundle.getSelectedGenericCapabilities
in interface BundleDescription
public ExportPackageDescription[] getSubstitutedExports()
BundleDescription
getSubstitutedExports
in interface BundleDescription
public BundleDescription[] getResolvedRequires()
BundleDescription
getResolvedRequires
in interface BundleDescription
public ExportPackageDescription[] getResolvedImports()
BundleDescription
getResolvedImports
in interface BundleDescription
public GenericDescription[] getResolvedGenericRequires()
BundleDescription
getResolvedGenericRequires
in interface BundleDescription
protected 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()
BundleDescription
toString
in interface BundleDescription
toString
in class Object
public Object getKey()
KeyedElement
getKey
in interface KeyedElement
public boolean compare(KeyedElement other)
KeyedElement
compare
in interface KeyedElement
other
- the element to compare withpublic int getKeyHashCode()
KeyedElement
getKeyHashCode
in interface KeyedElement
protected 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()
BundleDescription
getDependents
in interface BundleDescription
public void setEquinoxEE(int equinox_ee)
public int getEquinoxEE()
public Map<String,Object> getAttributes()
BundleDescription
getAttributes
in interface BundleDescription
public Map<String,String> getDeclaredDirectives()
BaseDescription
getDeclaredDirectives
in interface BaseDescription
public Map<String,Object> getDeclaredAttributes()
BaseDescription
getDeclaredAttributes
in interface BaseDescription
public List<BundleRequirement> getDeclaredRequirements(String namespace)
BundleRevision
getDeclaredRequirements
in interface BundleRevision
namespace
- The namespace of the declared requirements to return or
null
to return the declared requirements from all
namespaces.BundleRequirement
s 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)
BundleRevision
getDeclaredCapabilities
in interface BundleRevision
namespace
- The namespace of the declared capabilities to return or
null
to return the declared capabilities from all
namespaces.BundleCapability
s 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()
BundleRevision
If this bundle revision is not one or more of the defined types then 0 is returned.
getTypes
in interface BundleRevision
public Bundle getBundle()
BundleReference
Bundle
object associated with this
BundleReference
.getBundle
in interface BundleReference
Bundle
object associated with this
BundleReference
.public BundleWiring getWiring()
BundleRevision
getWiring
in interface BundleRevision
null
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 BundleRevision
getCapabilities
in interface Resource
namespace
- The namespace of the declared capabilities to return or
null
to return the declared capabilities from all
namespaces.Capability
s
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 BundleRevision
getRequirements
in interface Resource
namespace
- 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–2018 The Apache Software Foundation. All rights reserved.