Class CapabilityImpl

  • All Implemented Interfaces:
    org.osgi.resource.Capability

    public class CapabilityImpl
    extends AbstractCapabilityRequirement
    implements org.osgi.resource.Capability
    Implementation of the OSGi Capability interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      CapabilityImpl​(org.osgi.resource.Resource res, java.lang.String ns, java.util.Map<java.lang.String,​java.lang.String> dirs, java.util.Map<java.lang.String,​java.lang.Object> attrs)
      Create a capability.
      CapabilityImpl​(org.osgi.resource.Resource resource, org.osgi.resource.Capability capability)
      Create a capability based on an existing capability, providing the resource.
    • Field Detail

      • mandatory

        protected final java.util.Set<java.lang.String> mandatory
    • Constructor Detail

      • CapabilityImpl

        public CapabilityImpl​(org.osgi.resource.Resource res,
                              java.lang.String ns,
                              java.util.Map<java.lang.String,​java.lang.String> dirs,
                              java.util.Map<java.lang.String,​java.lang.Object> attrs)
        Create a capability.
        Parameters:
        res - The resource associated with the capability.
        ns - The namespace of the capability.
        attrs - The attributes of the capability.
        dirs - The directives of the capability.
      • CapabilityImpl

        public CapabilityImpl​(org.osgi.resource.Resource resource,
                              org.osgi.resource.Capability capability)
        Create a capability based on an existing capability, providing the resource. The namespace, attributes and directives are copied from the provided capability.
        Parameters:
        capability - The capability to base the new requirement on.
        resource - The resource to be associated with the capability
    • Method Detail

      • isAttributeMandatory

        public boolean isAttributeMandatory​(java.lang.String name)