Package org.osgi.resource
Interface Capability
-
- All Known Subinterfaces:
BundleCapability,HostedCapability
@ConsumerType public interface Capability
A capability that has been declared from aResource.Instances of this type must be effectively immutable. That is, for a given instance of this interface, the methods defined by this interface must always return the same result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(Object obj)Compares thisCapabilityto anotherCapability.Map<String,Object>getAttributes()Returns the attributes of this capability.Map<String,String>getDirectives()Returns the directives of this capability.StringgetNamespace()Returns the namespace of this capability.ResourcegetResource()Returns the resource declaring this capability.inthashCode()Returns the hashCode of thisCapability.
-
-
-
Method Detail
-
getNamespace
String getNamespace()
Returns the namespace of this capability.- Returns:
- The namespace of this capability.
-
getDirectives
Map<String,String> getDirectives()
Returns the directives of this capability.- Returns:
- An unmodifiable map of directive names to directive values for this capability, or an empty map if this capability has no directives.
-
getAttributes
Map<String,Object> getAttributes()
Returns the attributes of this capability.- Returns:
- An unmodifiable map of attribute names to attribute values for this capability, or an empty map if this capability has no attributes.
-
getResource
Resource getResource()
Returns the resource declaring this capability.- Returns:
- The resource declaring this capability.
-
equals
boolean equals(Object obj)
Compares thisCapabilityto anotherCapability.This
Capabilityis equal to anotherCapabilityif they have the same namespace, directives and attributes and are declared by the same resource.
-
-