org.jboss.deployers.structure.spi.classloading.helpers
Class ModuleCapabilityImpl

java.lang.Object
  extended by org.jboss.deployers.structure.spi.classloading.helpers.ModuleCapabilityImpl
All Implemented Interfaces:
Serializable, Capability, ModuleCapability

public class ModuleCapabilityImpl
extends Object
implements ModuleCapability

ModuleCapabilityImpl.

Version:
$Revision: 1.1 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
ModuleCapabilityImpl(String name)
          Create a new ModuleCapabilityImpl with the default version
ModuleCapabilityImpl(String name, Version version)
          Create a new ModuleCapabilityImpl.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          The name of the module
 Version getVersion()
          The version of the module
 int hashCode()
           
 boolean resolves(DeploymentUnit unit, Requirement requirement)
          Whether this capability resolves the requirement
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleCapabilityImpl

public ModuleCapabilityImpl(String name)
Create a new ModuleCapabilityImpl with the default version

Parameters:
name - the name
Throws:
IllegalArgumentException - for a null name

ModuleCapabilityImpl

public ModuleCapabilityImpl(String name,
                            Version version)
Create a new ModuleCapabilityImpl.

Parameters:
name - the name
version - the version - pass null for default version
Throws:
IllegalArgumentException - for a null name
Method Detail

getName

public String getName()
Description copied from interface: ModuleCapability
The name of the module

Specified by:
getName in interface ModuleCapability
Returns:
the name

getVersion

public Version getVersion()
Description copied from interface: ModuleCapability
The version of the module

Specified by:
getVersion in interface ModuleCapability
Returns:
the version

resolves

public boolean resolves(DeploymentUnit unit,
                        Requirement requirement)
Description copied from interface: Capability
Whether this capability resolves the requirement

Specified by:
resolves in interface Capability
Parameters:
unit - the deployment
requirement - the requirement
Returns:
true when it is resolves the requirement

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 JBoss Inc.. All Rights Reserved.