org.jdtaus.core.container
Class Implementation

java.lang.Object
  extended by org.jdtaus.core.container.ModelObject
      extended by org.jdtaus.core.container.Implementation
All Implemented Interfaces:
Serializable, Cloneable

public class Implementation
extends ModelObject
implements Cloneable, Serializable

Implementation meta-data.

An implementation consists of the properties identifier, name, description, vendor and version. Property identifier holds an identifier uniquely identifying the implementation in a collection of implementations. Property name holds a name of the implementation uniquely identifying the implementation for a specification. Property description holds a textual description. Property vendor holds vendor information for the vendor providing the implementation. Property version holds a textual version of the implementation. Properties, dependencies and implemented specifications may be inherited from a parent up the hierarchy. Property final flags an implementation as the final node in an inheritance hierarchy.

Version:
$Id: Implementation.java 8044 2009-07-02 01:29:05Z schulte2005 $
Author:
Christian Schulte
See Also:
Serialized Form

Constructor Summary
Implementation()
           
 
Method Summary
 Object clone()
          Creates and returns a copy of this object.
 boolean equals(Object o)
          Indicates whether some other object is equal to this one by comparing properties identifier and version.
 Dependencies getDeclaredDependencies()
          Gets the declared dependencies of the implementation.
 Specifications getDeclaredImplementedSpecifications()
          Gets the specifications the implementation declares to implement.
 Messages getDeclaredMessages()
          Gets the declared messages of the implementation.
 Properties getDeclaredProperties()
          Gets the declared properties of the implementation.
 Dependencies getDependencies()
          Gets the dependencies of the implementation.
 String getIdentifier()
          Gets the identifier of the implementation.
 Specifications getImplementedSpecifications()
          Gets the specifications the implementation implements.
 Messages getMessages()
          Gets the messages of the implementation.
 String getModuleName()
          Gets the name of the module holding the implementation.
 String getName()
          Gets the name of the implementation.
 Implementation getParent()
          Gets the parent implementation the implementation inherits from.
 Properties getProperties()
          Gets the properties of the implementation.
 String getVendor()
          Gets the vendor of the implementation.
 String getVersion()
          Gets the version of the implementation.
 int hashCode()
          Returns a hash code value for this object.
 boolean isFinal()
          Gets a flag indicating if the implementation is a final node in an inheritance hierarchy.
 void setDependencies(Dependencies value)
          Setter for property dependencies.
 void setFinal(boolean value)
          Setter for property final.
 void setIdentifier(String value)
          Setter for property identifier.
 void setImplementedSpecifications(Specifications value)
          Setter for property implementedSpecifications.
 void setMessages(Messages value)
          Setter for property messages.
 void setModuleName(String value)
          Setter for property moduleName.
 void setName(String value)
          Setter for property name.
 void setParent(Implementation value)
          Setter for property parent.
 void setProperties(Properties value)
          Setter for property properties.
 void setVendor(String value)
          Setter for property name.
 void setVersion(String value)
          Setter for property version.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jdtaus.core.container.ModelObject
getDocumentation, getModelVersion, setDocumentation, setModelVersion
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Implementation

public Implementation()
Method Detail

clone

public Object clone()
Creates and returns a copy of this object. This method performs a "shallow copy" of this object, not a "deep copy" operation.

Overrides:
clone in class 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 properties identifier and version.

Overrides:
equals in class Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as o; false otherwise.

getDeclaredDependencies

public Dependencies getDeclaredDependencies()
Gets the declared dependencies of the implementation.

Returns:
the declared dependencies of the implementation.

getDeclaredImplementedSpecifications

public Specifications getDeclaredImplementedSpecifications()
Gets the specifications the implementation declares to implement.

Returns:
the specifications the implementation declares to implement.

getDeclaredMessages

public Messages getDeclaredMessages()
Gets the declared messages of the implementation.

Returns:
the declared messages of the implementation.

getDeclaredProperties

public Properties getDeclaredProperties()
Gets the declared properties of the implementation.

Returns:
the declared properties of the implementation.

getDependencies

public Dependencies getDependencies()
Gets the dependencies of the implementation.

The dependencies of an implementation are a merged set of all parent dependencies overwritten by any declared dependencies.

Returns:
the dependencies the implementation depends on.
Throws:
IllegalDependencyTypeException - for any dependency type collisions during merging.

getIdentifier

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

Returns:
the unique identifier of the implementation.

getImplementedSpecifications

public Specifications getImplementedSpecifications()
Gets the specifications the implementation implements.

The specifications an implementation implements are a merged set of all specifications implemented by any parent overwritten by any declared implemented specifications.

Returns:
the specifications the implementation implements.

getMessages

public Messages getMessages()
Gets the messages of the implementation.

The messages of an implementation are a merged set of all parent messages overwritten by any declared messages.

Returns:
the messages of the implementation.

getModuleName

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

Returns:
the name of the module holding the implementation.

getName

public String getName()
Gets the name of the implementation.

Returns:
the name of the implementation.

getParent

public Implementation getParent()
Gets the parent implementation the implementation inherits from.

Returns:
the parent implementation the implementation inherits from or null if the implementation has no parent.
See Also:
InheritanceConstraintException

getProperties

public Properties getProperties()
Gets the properties of the implementation.

The properties of an implementation are a merged set of all parent properties overwritten by any declared properties.

Returns:
the properties of the implementation.
Throws:
IllegalPropertyTypeException - for any property type collisions during merging.
PropertyOverwriteConstraintException - if the implementation does not provide values for all properties declared for its implemented specifications.

getVendor

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

Returns:
the vendor of the implementation.

getVersion

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

Returns:
the version of the implementation or null.

hashCode

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

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

isFinal

public boolean isFinal()
Gets a flag indicating if the implementation is a final node in an inheritance hierarchy.

Returns:
true if the implementation is a final node in an inheritance hierarchy; false if the implementation is allowed to be the parent of another implementation.
See Also:
InheritanceConstraintException

setDependencies

public void setDependencies(Dependencies value)
Setter for property dependencies.

Parameters:
value - the new dependencies of the implementation.

setFinal

public void setFinal(boolean value)
Setter for property final.

Parameters:
value - true if the implementation is a final node in an inheritance hierarchy; false if the implementation is allowed to be the parent of another implementation.
See Also:
InheritanceConstraintException

setIdentifier

public void setIdentifier(String value)
Setter for property identifier.

Parameters:
value - the new identifier of the implementation.

setImplementedSpecifications

public void setImplementedSpecifications(Specifications value)
Setter for property implementedSpecifications.

Parameters:
value - the new specifications the implementation implements.

setMessages

public void setMessages(Messages value)
Setter for property messages.

Parameters:
value - new messages of the implementation.

setModuleName

public void setModuleName(String value)
Setter for property moduleName.

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

setName

public void setName(String value)
Setter for property name.

Parameters:
value - the new name of the implementation.

setParent

public void setParent(Implementation value)
Setter for property parent.

Parameters:
value - the new parent implementation of the implementation.
Throws:
InheritanceConstraintException - if value is flagged as final.

setProperties

public void setProperties(Properties value)
Setter for property properties.

Parameters:
value - new properties of the implementation.

setVendor

public void setVendor(String value)
Setter for property name.

Parameters:
value - the new vendor of the implementation.

setVersion

public void setVersion(String value)
Setter for property version.

Parameters:
value - the new version of the implementation.

toString

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

Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2005-2009 jDTAUS. All Rights Reserved.