org.jboss.classloading.plugins.metadata
Class ModuleCapability

java.lang.Object
  extended by org.jboss.classloading.spi.helpers.NameAndVersionSupport
      extended by org.jboss.classloading.spi.metadata.helpers.AbstractCapability
          extended by org.jboss.classloading.plugins.metadata.ModuleCapability
All Implemented Interfaces:
Serializable, Cloneable, Capability

public class ModuleCapability
extends AbstractCapability

ModuleCapability.

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

Constructor Summary
ModuleCapability()
          Create a new ModuleCapability.
ModuleCapability(String name)
          Create a new ModuleCapability with the default version
ModuleCapability(String name, Object version)
          Create a new ModuleCapability.
 
Method Summary
 boolean equals(Object obj)
           
 boolean resolves(Module module, Requirement requirement)
          Whether this capability resolves the requirement
 
Methods inherited from class org.jboss.classloading.spi.metadata.helpers.AbstractCapability
toString, toString
 
Methods inherited from class org.jboss.classloading.spi.helpers.NameAndVersionSupport
clone, getName, getTheVersion, getVersion, hashCode, setName, setTheVersion, setVersion
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleCapability

public ModuleCapability()
Create a new ModuleCapability.


ModuleCapability

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

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

ModuleCapability

public ModuleCapability(String name,
                        Object version)
Create a new ModuleCapability.

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

resolves

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

Parameters:
module - the module
requirement - the requirement
Returns:
true when it is resolves the requirement

equals

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


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.