org.jboss.osgi.resolver.spi
Class AbstractBundleRevision
java.lang.Object
org.jboss.osgi.resolver.spi.AbstractResource
org.jboss.osgi.resolver.spi.AbstractBundleRevision
- All Implemented Interfaces:
- XAttachmentSupport, XBundleRevision, XElement, XResource, org.osgi.framework.BundleReference, org.osgi.framework.wiring.BundleRevision, org.osgi.resource.Resource
public class AbstractBundleRevision
- extends AbstractResource
- implements XBundleRevision
The abstract implementation of an XBundleRevision.
- Since:
- 30-May-2012
- Author:
- thomas.diesler@jboss.com
| Fields inherited from interface org.osgi.framework.wiring.BundleRevision |
BUNDLE_NAMESPACE, HOST_NAMESPACE, PACKAGE_NAMESPACE, TYPE_FRAGMENT |
| Methods inherited from interface org.osgi.framework.wiring.BundleRevision |
getCapabilities, getRequirements |
| Methods inherited from interface org.osgi.resource.Resource |
equals, hashCode |
AbstractBundleRevision
public AbstractBundleRevision()
getSymbolicName
public String getSymbolicName()
- Specified by:
getSymbolicName in interface org.osgi.framework.wiring.BundleRevision
getVersion
public org.osgi.framework.Version getVersion()
- Specified by:
getVersion in interface org.osgi.framework.wiring.BundleRevision
getDeclaredCapabilities
public List<org.osgi.framework.wiring.BundleCapability> getDeclaredCapabilities(String namespace)
- Specified by:
getDeclaredCapabilities in interface org.osgi.framework.wiring.BundleRevision
getDeclaredRequirements
public List<org.osgi.framework.wiring.BundleRequirement> getDeclaredRequirements(String namespace)
- Specified by:
getDeclaredRequirements in interface org.osgi.framework.wiring.BundleRevision
getTypes
public int getTypes()
- Specified by:
getTypes in interface org.osgi.framework.wiring.BundleRevision
getWiring
public org.osgi.framework.wiring.BundleWiring getWiring()
- Specified by:
getWiring in interface org.osgi.framework.wiring.BundleRevision
getBundle
public XBundle getBundle()
- Description copied from interface:
XBundleRevision
- Get the associated
XBundle
- Specified by:
getBundle in interface XBundleRevision- Specified by:
getBundle in interface org.osgi.framework.BundleReference
getModuleIdentifier
public org.jboss.modules.ModuleIdentifier getModuleIdentifier()
- Description copied from interface:
XBundleRevision
- Get the associated
ModuleIdentifier
or null if the revision is not resolved
- Specified by:
getModuleIdentifier in interface XBundleRevision
getModuleClassLoader
public org.jboss.modules.ModuleClassLoader getModuleClassLoader()
- Description copied from interface:
XBundleRevision
- Get the associated
ModuleIdentifier
or null if the revision is not resolved
- Specified by:
getModuleClassLoader in interface XBundleRevision
findEntries
public Enumeration<URL> findEntries(String path,
String filePattern,
boolean recursive)
- Specified by:
findEntries in interface XBundleRevision
- See Also:
Bundle#findEntries(String, String, boolean)}
getResource
public URL getResource(String name)
- Specified by:
getResource in interface XBundleRevision
- See Also:
Bundle#getResource(String)}
getResources
public Enumeration<URL> getResources(String name)
throws IOException
- Specified by:
getResources in interface XBundleRevision
- Throws:
IOException- See Also:
Bundle#getResources(String)}
getEntry
public URL getEntry(String path)
- Specified by:
getEntry in interface XBundleRevision
- See Also:
Bundle#getEntry(String)}
getEntryPaths
public Enumeration<String> getEntryPaths(String path)
- Specified by:
getEntryPaths in interface XBundleRevision
- See Also:
Bundle#getEntryPaths(String)}
addAttachment
public <T> T addAttachment(Class<T> clazz,
T value)
- Description copied from interface:
XAttachmentSupport
- Attach an arbirtary object with this element.
- Specified by:
addAttachment in interface XAttachmentSupport
- Parameters:
clazz - key for the attachment
- Returns:
- The previously attachment object or null
getAttachment
public <T> T getAttachment(Class<T> clazz)
- Description copied from interface:
XAttachmentSupport
- Get the attached object for a given key
- Specified by:
getAttachment in interface XAttachmentSupport
- Parameters:
clazz - key for the attachment
- Returns:
- The attached object or null
removeAttachment
public <T> T removeAttachment(Class<T> clazz)
- Description copied from interface:
XAttachmentSupport
- Remove an attached object for a given key
- Specified by:
removeAttachment in interface XAttachmentSupport
- Parameters:
clazz - key for the attachment
- Returns:
- The attached object or null
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.