Class WrappedRevision
- java.lang.Object
-
- org.apache.felix.framework.resolver.WrappedRevision
-
- All Implemented Interfaces:
BundleReference
,BundleRevision
,Resource
class WrappedRevision extends java.lang.Object implements BundleRevision
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<BundleCapability>
m_cachedCapabilities
private java.util.List<BundleRequirement>
m_cachedRequirements
private java.util.List<BundleRevision>
m_fragments
private BundleRevision
m_host
-
Fields inherited from interface org.osgi.framework.wiring.BundleRevision
BUNDLE_NAMESPACE, HOST_NAMESPACE, PACKAGE_NAMESPACE, TYPE_FRAGMENT
-
-
Constructor Summary
Constructors Constructor Description WrappedRevision(BundleRevision host, java.util.List<BundleRevision> fragments)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.List<Capability>
asCapabilityList(java.util.List caps)
private static java.util.List<Requirement>
asRequirementList(java.util.List reqs)
Bundle
getBundle()
Returns theBundle
object associated with thisBundleReference
.java.util.List<Capability>
getCapabilities(java.lang.String namespace)
Returns the capabilities declared by this resource.java.util.List<BundleCapability>
getDeclaredCapabilities(java.lang.String namespace)
Returns the capabilities declared by this bundle revision.java.util.List<BundleRequirement>
getDeclaredRequirements(java.lang.String namespace)
Returns the requirements declared by this bundle revision.java.util.List<BundleRevision>
getFragments()
BundleRevision
getHost()
java.util.List<Requirement>
getRequirements(java.lang.String namespace)
Returns the requirements declared by this bundle resource.java.lang.String
getSymbolicName()
Returns the symbolic name for this bundle revision.int
getTypes()
Returns the special types of this bundle revision.Version
getVersion()
Returns the version for this bundle revision.BundleWiring
getWiring()
Returns the bundle wiring which is using this bundle revision.java.lang.String
toString()
-
-
-
Field Detail
-
m_host
private final BundleRevision m_host
-
m_fragments
private final java.util.List<BundleRevision> m_fragments
-
m_cachedCapabilities
private java.util.List<BundleCapability> m_cachedCapabilities
-
m_cachedRequirements
private java.util.List<BundleRequirement> m_cachedRequirements
-
-
Constructor Detail
-
WrappedRevision
public WrappedRevision(BundleRevision host, java.util.List<BundleRevision> fragments)
-
-
Method Detail
-
getHost
public BundleRevision getHost()
-
getFragments
public java.util.List<BundleRevision> getFragments()
-
getSymbolicName
public java.lang.String getSymbolicName()
Description copied from interface:BundleRevision
Returns the symbolic name for this bundle revision.- Specified by:
getSymbolicName
in interfaceBundleRevision
- Returns:
- The symbolic name for this bundle revision.
- See Also:
Bundle.getSymbolicName()
-
getVersion
public Version getVersion()
Description copied from interface:BundleRevision
Returns the version for this bundle revision.- Specified by:
getVersion
in interfaceBundleRevision
- Returns:
- The version for this bundle revision, or
Version.emptyVersion
if this bundle revision has no version information. - See Also:
Bundle.getVersion()
-
getCapabilities
public java.util.List<Capability> getCapabilities(java.lang.String namespace)
Description copied from interface:BundleRevision
Returns the capabilities declared by this resource.This method returns the same value as
BundleRevision.getDeclaredCapabilities(String)
.- Specified by:
getCapabilities
in interfaceBundleRevision
- Specified by:
getCapabilities
in interfaceResource
- Parameters:
namespace
- The namespace of the declared capabilities to return ornull
to return the declared capabilities from all namespaces.- Returns:
- An unmodifiable list containing the declared
Capability
s from the specified namespace. The returned list will be empty if this resource declares no capabilities in the specified namespace.
-
asCapabilityList
private static java.util.List<Capability> asCapabilityList(java.util.List caps)
-
getDeclaredCapabilities
public java.util.List<BundleCapability> getDeclaredCapabilities(java.lang.String namespace)
Description copied from interface:BundleRevision
Returns the capabilities declared by this bundle revision.- Specified by:
getDeclaredCapabilities
in interfaceBundleRevision
- Parameters:
namespace
- The namespace of the declared capabilities to return ornull
to return the declared capabilities from all namespaces.- Returns:
- An unmodifiable list containing the declared
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.
-
getRequirements
public java.util.List<Requirement> getRequirements(java.lang.String namespace)
Description copied from interface:BundleRevision
Returns the requirements declared by this bundle resource.This method returns the same value as
BundleRevision.getDeclaredRequirements(String)
.- Specified by:
getRequirements
in interfaceBundleRevision
- Specified by:
getRequirements
in interfaceResource
- Parameters:
namespace
- The namespace of the declared requirements to return ornull
to return the declared requirements from all namespaces.- Returns:
- An unmodifiable list containing the declared
Requirement
s from the specified namespace. The returned list will be empty if this resource declares no requirements in the specified namespace.
-
asRequirementList
private static java.util.List<Requirement> asRequirementList(java.util.List reqs)
-
getDeclaredRequirements
public java.util.List<BundleRequirement> getDeclaredRequirements(java.lang.String namespace)
Description copied from interface:BundleRevision
Returns the requirements declared by this bundle revision.- Specified by:
getDeclaredRequirements
in interfaceBundleRevision
- Parameters:
namespace
- The namespace of the declared requirements to return ornull
to return the declared requirements from all namespaces.- Returns:
- An unmodifiable list containing the declared
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.
-
getTypes
public int getTypes()
Description copied from interface:BundleRevision
Returns the special types of this bundle revision. The bundle revision type values are: A bundle revision may be more than one type at a time. A type code is used to identify the bundle revision type for future extendability.If this bundle revision is not one or more of the defined types then 0 is returned.
- Specified by:
getTypes
in interfaceBundleRevision
- Returns:
- The special types of this bundle revision. The type values are ORed together.
-
getWiring
public BundleWiring getWiring()
Description copied from interface:BundleRevision
Returns the bundle wiring which is using this bundle revision.- Specified by:
getWiring
in interfaceBundleRevision
- Returns:
- The bundle wiring which is using this bundle revision or
null
if no bundle wiring is using this bundle revision. - See Also:
BundleWiring.getRevision()
-
getBundle
public Bundle getBundle()
Description copied from interface:BundleReference
Returns theBundle
object associated with thisBundleReference
.- Specified by:
getBundle
in interfaceBundleReference
- Returns:
- The
Bundle
object associated with thisBundleReference
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-