org.jdtaus.core.container
Class Modules

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

public class Modules
extends Object
implements Cloneable, Serializable

Collection of modules.

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

Constructor Summary
Modules()
           
 
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 the values of all properties.
 Implementation getImplementation(String identifier)
          Gets an implementation for an identifier.
 Implementations getImplementations()
          Gets a collection of all implementations of all modules held by the instance.
 Module getModule(int index)
          Gets a module for an index.
 Module getModule(String name)
          Gets a module for a name.
 Module[] getModules()
          Gets the modules of the collection.
 Specification getSpecification(String identifier)
          Gets a specification for an identifier.
 Specifications getSpecifications()
          Gets a collection of all specifications of all modules.
 int hashCode()
          Returns a hash code value for this object.
 void setModules(Module[] value)
          Setter for property .
 int size()
          Gets the number of modules held by the instance.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Modules

public Modules()
Method Detail

clone

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

Returns:
a clone of this instance.

equals

public boolean equals(Object o)
Indicates whether some other object is equal to this one by comparing the values of all properties.

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

getImplementation

public Implementation getImplementation(String identifier)
Gets an implementation for an identifier.

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

getImplementations

public Implementations getImplementations()
Gets a collection of all implementations of all modules held by the instance.

Returns:
a reference to all implementations of all modules held by the instance.

getModule

public final Module getModule(int index)
Gets a module for an index.

Parameters:
index - the index of the module to return.
Returns:
a reference to the module at .
Throws:
IndexOutOfBoundsException - if is negativ, greater than or equal to .

getModule

public Module getModule(String name)
Gets a module for a name.

Parameters:
name - the name of the module to return.
Returns:
a reference to the module named .
Throws:
NullPointerException - if is .
MissingModuleException - if no module matching exists in the collection.

getModules

public Module[] getModules()
Gets the modules of the collection.

Returns:
the modules of the collection.

getSpecification

public Specification getSpecification(String identifier)
Gets a specification for an identifier.

Parameters:
identifier - the identifier of the specification to return.
Returns:
a reference to the specification identified by .
Throws:
NullPointerException - if is .
MissingSpecificationException - if no specification matching exists.

getSpecifications

public Specifications getSpecifications()
Gets a collection of all specifications of all modules.

Returns:
a reference to all specifications of all modules held by the instance.

hashCode

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

Returns:
a hash code value for this object.

setModules

public void setModules(Module[] value)
Setter for property .

Parameters:
value - the new collection of modules.
Throws:
DuplicateModuleException - if contains duplicate modules.
DuplicateSpecificationException - if contains duplicate specifications.
DuplicateImplementationException - if contains duplicate implementations.

size

public final int size()
Gets the number of modules held by the instance.

Returns:
the number of modules held by the instance.

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.