|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.osgi.resolver.spi.AbstractHostRequirement
public class AbstractHostRequirement
The abstract implementation of a XHostRequirement.
| Constructor Summary | |
|---|---|
AbstractHostRequirement(XRequirement delegate)
|
|
| Method Summary | ||
|---|---|---|
|
adapt(Class<T> clazz)
Adapt this requirement to another type |
|
|
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element. |
|
boolean |
equals(Object obj)
Compares this Requirement to another Requirement. |
|
|
getAttachment(Class<T> clazz)
Get the attached object for a given key |
|
Object |
getAttribute(String key)
Get the value of the given attribute |
|
Map<String,Object> |
getAttributes()
Get the attributes |
|
String |
getDirective(String key)
Get the value of the given directive |
|
Map<String,String> |
getDirectives()
Get the directives |
|
String |
getNamespace()
Returns the namespace of this requirement. |
|
Resource |
getResource()
Returns the resource declaring this requirement. |
|
String |
getSymbolicName()
The bundle symbolic name |
|
org.jboss.osgi.metadata.VersionRange |
getVersionRange()
The bundle version range |
|
int |
hashCode()
Returns the hashCode of this Requirement. |
|
boolean |
isOptional()
A flag indicating that this is an optional requirement. |
|
boolean |
matches(Capability cap)
Matches this requirement against the given capability. |
|
|
removeAttachment(Class<T> clazz)
Remove an attached object for a given key |
|
String |
toString()
|
|
void |
validate()
Validate the requirement |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.osgi.resolver.XRequirement |
|---|
adapt, isOptional, validate |
| Methods inherited from interface org.jboss.osgi.resolver.XAttachmentSupport |
|---|
addAttachment, getAttachment, removeAttachment |
| Methods inherited from interface org.jboss.osgi.resolver.XAttributeSupport |
|---|
getAttribute, getAttributes |
| Methods inherited from interface org.jboss.osgi.resolver.XDirectiveSupport |
|---|
getDirective, getDirectives |
| Methods inherited from interface org.osgi.resource.Requirement |
|---|
equals, getAttributes, getDirectives, getNamespace, getResource, hashCode |
| Constructor Detail |
|---|
public AbstractHostRequirement(XRequirement delegate)
| Method Detail |
|---|
public String getSymbolicName()
XHostRequirement
getSymbolicName in interface XHostRequirementpublic org.jboss.osgi.metadata.VersionRange getVersionRange()
XHostRequirement
getVersionRange in interface XHostRequirementpublic boolean matches(Capability cap)
XRequirement
matches in interface XRequirement
public <T> T addAttachment(Class<T> clazz,
T value)
XAttachmentSupport
addAttachment in interface XAttachmentSupportclazz - key for the attachment
public Map<String,Object> getAttributes()
XAttributeSupport
getAttributes in interface XAttributeSupportgetAttributes in interface Requirementpublic Map<String,String> getDirectives()
XDirectiveSupport
getDirectives in interface XDirectiveSupportgetDirectives in interface Requirementpublic void validate()
XRequirement
validate in interface XRequirementpublic Object getAttribute(String key)
XAttributeSupport
getAttribute in interface XAttributeSupportpublic String getDirective(String key)
XDirectiveSupport
getDirective in interface XDirectiveSupportpublic <T> T getAttachment(Class<T> clazz)
XAttachmentSupport
getAttachment in interface XAttachmentSupportclazz - key for the attachment
public <T> T removeAttachment(Class<T> clazz)
XAttachmentSupport
removeAttachment in interface XAttachmentSupportclazz - key for the attachment
public String getNamespace()
Requirement
getNamespace in interface Requirementpublic Resource getResource()
Requirement
getResource in interface Requirementnull
if this requirement is synthesized.public boolean isOptional()
XRequirement
isOptional in interface XRequirementpublic <T extends XRequirement> T adapt(Class<T> clazz)
XRequirement
adapt in interface XRequirementpublic boolean equals(Object obj)
RequirementRequirement to another Requirement.
This Requirement is equal to another Requirement if they
have the same namespace, directives and attributes and are declared by
the same resource.
equals in interface Requirementequals in class Objectobj - The object to compare against this Requirement.
true if this Requirement is equal to the other
object; false otherwise.public int hashCode()
RequirementRequirement.
hashCode in interface RequirementhashCode in class ObjectRequirement.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||