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.
  • Field Details

    • mandatory

      protected final Set<String> mandatory
  • Constructor Details

    • CapabilityImpl

      public CapabilityImpl(org.osgi.resource.Resource res, String ns, Map<String,String> dirs, Map<String,Object> attrs)
      Create a capability.
      Parameters:
      res - The resource associated with the capability.
      ns - The namespace of the capability.
      dirs - The directives of the capability.
      attrs - The attributes 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:
      resource - The resource to be associated with the capability
      capability - The capability to base the new requirement on.
  • Method Details

    • isAttributeMandatory

      public boolean isAttributeMandatory(String name)