org.jdtaus.core.container
Class Specification

java.lang.Object
  extended byorg.jdtaus.core.container.Specification
All Implemented Interfaces:
Cloneable, Serializable

public class Specification
extends Object
implements Cloneable, Serializable

Specification meta-data.

A specification consists of the properties , , and . Property holds an identifier uniquely identifying the specification in a collection of specifications. Property holds vendor information for the vendor providing the specification. Property holds a textual description and property holds a textual version of the specification. The flag indicates whether implementations of the specification should be instantiated once or whenever requested through the container.

Version:
$Id: Specification.java 2230 2007-03-26 01:37:48Z schulte2005 $
Author:
Christian Schulte
See Also:
Serialized Form

Constructor Summary
Specification()
           
 
Method Summary
 Object clone()
          Creates and returns a deep copy of this object.
 boolean equals(Object o)
          Indicates whether some other object is equal to this one by comparing property .
 String getDescription()
          Gets the description of the specification.
 String getIdentifier()
          Gets the identifier of the specification.
 Implementation getImplementation(String name)
          Gets an implementation for a name.
 Implementations getImplementations()
          Gets all available implementations of the specification.
 String getModuleName()
          Gets the name of the module holding the specification.
 String getVendor()
          Gets the vendor of the specification.
 String getVersion()
          Gets the version of the specification.
 int hashCode()
          Returns a hash code value for this object.
 boolean isSingleton()
          Gets the flag indicating the instantiation strategy of the specification.
 void setDescription(String value)
          Setter for property .
 void setIdentifier(String value)
          Setter for property .
 void setImplementations(Implementations value)
          Setter for property .
 void setModuleName(String value)
          Setter for property .
 void setSingleton(boolean value)
          Setter for property .
 void setVendor(String value)
          Setter for property .
 void setVersion(String value)
          Setter for property .
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Specification

public Specification()
Method Detail

clone

public Object clone()
Creates and returns a deep copy of this object.

Returns:
a clone of this instance.

equals

public final boolean equals(Object o)
Indicates whether some other object is equal to this one by comparing property .

Parameters:
o - the reference object with which to compare.
Returns:
if this object is the same as ; otherwise.

getDescription

public String getDescription()
Gets the description of the specification.

Returns:
the description of the specification.

getIdentifier

public String getIdentifier()
Gets the identifier of the specification.

Returns:
the unique identifier of the specification.

getImplementation

public Implementation getImplementation(String name)
Gets an implementation for a name.

Parameters:
name - the name of the implementation to return.
Returns:
a reference to the implementation named .
Throws:
NullPointerException - if is .
MissingImplementationException - if no implementation matching exists.

getImplementations

public Implementations getImplementations()
Gets all available implementations of the specification.

Returns:
all available implementations of the specification.

getModuleName

public String getModuleName()
Gets the name of the module holding the specification.

Returns:
the name of the module holding the specification.

getVendor

public String getVendor()
Gets the vendor of the specification.

Returns:
the vendor of the specification.

getVersion

public String getVersion()
Gets the version of the specification.

Returns:
the version of the specification.

hashCode

public final int hashCode()
Returns a hash code value for this object.

Returns:
a hash code value for this object.

isSingleton

public boolean isSingleton()
Gets the flag indicating the instantiation strategy of the specification.

Returns:
if the specification is specifying a singleton; if not.

setDescription

public void setDescription(String value)
Setter for property .

Parameters:
value - the new description of the specification.

setIdentifier

public void setIdentifier(String value)
Setter for property .

Parameters:
value - the new identifier of the specification.

setImplementations

public void setImplementations(Implementations value)
Setter for property .

Parameters:
value - the new implementations of the specification.
Throws:
DuplicateImplementationException - if contains duplicate implementations.

setModuleName

public void setModuleName(String value)
Setter for property .

Parameters:
value - the new name of the module holding the specification.

setSingleton

public void setSingleton(boolean value)
Setter for property .

Parameters:
value - to flag the specification as a singleton; to not flag the specification as a singleton.

setVendor

public void setVendor(String value)
Setter for property .

Parameters:
value - the new vendor of the specification.

setVersion

public void setVersion(String value)
Setter for property .

Parameters:
value - the new version of the specification.

toString

public String toString()
Returns a string representation of the object.

Returns:
a string representation of the object.


Copyright © 2005-2007 jDTAUS. All Rights Reserved.