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

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

public class PackageCapabilityImpl
extends Object
implements PackageCapability

PackageCapabilityImpl.

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

Constructor Summary
PackageCapabilityImpl(String name)
          Create a new PackageCapabilityImpl with the default version
PackageCapabilityImpl(String name, Version version)
          Create a new PackageCapabilityImpl.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Get the package name
 Version getVersion()
          Get the package version
 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

PackageCapabilityImpl

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

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

PackageCapabilityImpl

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

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: PackageCapability
Get the package name

Specified by:
getName in interface PackageCapability
Returns:
the package name

getVersion

public Version getVersion()
Description copied from interface: PackageCapability
Get the package version

Specified by:
getVersion in interface PackageCapability
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.