org.jboss.osgi.resolver.spi
Class AbstractPackageRequirement

java.lang.Object
  extended by org.jboss.osgi.resolver.spi.AbstractPackageRequirement
All Implemented Interfaces:
XAttachmentSupport, XAttributeSupport, XDirectiveSupport, XElement, XPackageRequirement, XRequirement
Direct Known Subclasses:
AbstractDynamicPackageRequirement

public class AbstractPackageRequirement
extends Object
implements XPackageRequirement

The abstract implementation of a XPackageRequirement.

Since:
02-Jul-2010
Author:
thomas.diesler@jboss.com

Constructor Summary
AbstractPackageRequirement(AbstractModule module, String name, Map<String,String> dirs, Map<String,Object> atts)
           
 
Method Summary
<T> T
addAttachment(Class<T> clazz, T value)
           
<T> T
getAttachment(Class<T> clazz)
           
 Object getAttribute(String key)
           
 Map<String,Object> getAttributes()
           
 String getBundleSymbolicName()
           
 org.osgi.framework.Version getBundleVersion()
           
 String getDirective(String key)
           
 Map<String,String> getDirectives()
           
 XModule getModule()
           
 String getName()
           
 String getResolution()
           
 XVersionRange getVersionRange()
           
 XCapability getWiredCapability()
           
 boolean isDynamic()
           
 boolean isOptional()
           
 boolean match(XPackageCapability cap)
           
 boolean matchPackageName(XPackageCapability cap)
           
<T> T
removeAttachment(Class<T> clazz)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.osgi.resolver.XPackageRequirement
isDynamic
 
Methods inherited from interface org.jboss.osgi.resolver.XRequirement
getModule, getWiredCapability, isOptional
 
Methods inherited from interface org.jboss.osgi.resolver.XElement
getName
 
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.jboss.osgi.resolver.XAttachmentSupport
addAttachment, getAttachment, removeAttachment
 

Constructor Detail

AbstractPackageRequirement

public AbstractPackageRequirement(AbstractModule module,
                                  String name,
                                  Map<String,String> dirs,
                                  Map<String,Object> atts)
Method Detail

getResolution

public String getResolution()
Specified by:
getResolution in interface XPackageRequirement

getVersionRange

public XVersionRange getVersionRange()
Specified by:
getVersionRange in interface XPackageRequirement

getBundleSymbolicName

public String getBundleSymbolicName()
Specified by:
getBundleSymbolicName in interface XPackageRequirement

getBundleVersion

public org.osgi.framework.Version getBundleVersion()
Specified by:
getBundleVersion in interface XPackageRequirement

match

public boolean match(XPackageCapability cap)
Specified by:
match in interface XPackageRequirement

matchPackageName

public boolean matchPackageName(XPackageCapability cap)

toString

public String toString()
Overrides:
toString in class Object

getModule

public XModule getModule()
Specified by:
getModule in interface XRequirement

isOptional

public boolean isOptional()
Specified by:
isOptional in interface XRequirement

isDynamic

public boolean isDynamic()
Specified by:
isDynamic in interface XRequirement

getWiredCapability

public XCapability getWiredCapability()
Specified by:
getWiredCapability in interface XRequirement

getAttribute

public Object getAttribute(String key)
Specified by:
getAttribute in interface XAttributeSupport

getAttributes

public Map<String,Object> getAttributes()
Specified by:
getAttributes in interface XAttributeSupport

getDirective

public String getDirective(String key)
Specified by:
getDirective in interface XDirectiveSupport

getDirectives

public Map<String,String> getDirectives()
Specified by:
getDirectives in interface XDirectiveSupport

addAttachment

public <T> T addAttachment(Class<T> clazz,
                           T value)
Specified by:
addAttachment in interface XAttachmentSupport

getAttachment

public <T> T getAttachment(Class<T> clazz)
Specified by:
getAttachment in interface XAttachmentSupport

removeAttachment

public <T> T removeAttachment(Class<T> clazz)
Specified by:
removeAttachment in interface XAttachmentSupport

getName

public String getName()
Specified by:
getName in interface XElement


Copyright © 2012. All Rights Reserved.