org.jboss.classloading.spi.helpers
Class NameAndVersionSupport

java.lang.Object
  extended by org.jboss.classloading.spi.helpers.NameAndVersionSupport
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
AbstractCapability, ClassLoadingMetaData, Module

public class NameAndVersionSupport
extends Object
implements Serializable, Cloneable

NameAndVersionSupport.

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

Constructor Summary
NameAndVersionSupport()
          Create a new NameAndVersionSupport with the default version
NameAndVersionSupport(String name)
          Create a new NameAndVersionSupport with the default version
NameAndVersionSupport(String name, Object version)
          Create a new NameAndVersionSupport.
 
Method Summary
 NameAndVersionSupport clone()
           
 boolean equals(Object obj)
           
 String getName()
          Get the name.
 Version getTheVersion()
          Get the version.
 Object getVersion()
          Get the version.
 int hashCode()
           
 void setName(String name)
          Set the name.
 void setTheVersion(Version version)
          Set the version.
 void setVersion(Object version)
          Set the version.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameAndVersionSupport

public NameAndVersionSupport()
Create a new NameAndVersionSupport with the default version


NameAndVersionSupport

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

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

NameAndVersionSupport

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

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

getName

public String getName()
Get the name.

Returns:
the name.

setName

public void setName(String name)
Set the name.

Parameters:
name - the name.

getVersion

public Object getVersion()
Get the version.

Returns:
the version.

setVersion

public void setVersion(Object version)
Set the version.

Parameters:
version - the version.

getTheVersion

public Version getTheVersion()
Get the version.

Returns:
the version.

setTheVersion

public void setTheVersion(Version version)
Set the version.

Parameters:
version - the version.

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

clone

public NameAndVersionSupport clone()
Overrides:
clone in class Object


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