Class CapabilityImpl
- java.lang.Object
-
- org.apache.felix.bundlerepository.impl.CapabilityImpl
-
- All Implemented Interfaces:
Capability
public class CapabilityImpl extends java.lang.Object implements Capability
-
-
Field Summary
-
Fields inherited from interface org.apache.felix.bundlerepository.Capability
BUNDLE, EXECUTIONENVIRONMENT, FRAGMENT, PACKAGE, SERVICE
-
-
Constructor Summary
Constructors Constructor Description CapabilityImpl()
CapabilityImpl(java.lang.String name)
CapabilityImpl(java.lang.String name, PropertyImpl[] properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDirective(java.lang.String key, java.lang.String value)
void
addProperty(java.lang.String name, java.lang.String value)
void
addProperty(java.lang.String name, java.lang.String type, java.lang.String value)
void
addProperty(Property prop)
java.util.Map<java.lang.String,java.lang.String>
getDirectives()
Return the directives of this capability.java.lang.String
getName()
Return the name of the capability.Property[]
getProperties()
Return the properties of this capabilityjava.util.Map<java.lang.String,java.lang.Object>
getPropertiesAsMap()
Return the map of properties.void
setName(java.lang.String name)
java.lang.String
toString()
-
-
-
Constructor Detail
-
CapabilityImpl
public CapabilityImpl()
-
CapabilityImpl
public CapabilityImpl(java.lang.String name)
-
CapabilityImpl
public CapabilityImpl(java.lang.String name, PropertyImpl[] properties)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Capability
Return the name of the capability.- Specified by:
getName
in interfaceCapability
-
setName
public void setName(java.lang.String name)
-
getPropertiesAsMap
public java.util.Map<java.lang.String,java.lang.Object> getPropertiesAsMap()
Description copied from interface:Capability
Return the map of properties.- Specified by:
getPropertiesAsMap
in interfaceCapability
- Returns:
- a Map
-
getProperties
public Property[] getProperties()
Description copied from interface:Capability
Return the properties of this capability- Specified by:
getProperties
in interfaceCapability
- Returns:
-
addProperty
public void addProperty(Property prop)
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)
-
addProperty
public void addProperty(java.lang.String name, java.lang.String type, java.lang.String value)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addDirective
public void addDirective(java.lang.String key, java.lang.String value)
-
getDirectives
public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface:Capability
Return the directives of this capability. The returned map can not be modified.- Specified by:
getDirectives
in interfaceCapability
- Returns:
- a Map of directives or an empty map there are no directives.
-
-