org.pf.tools.cda.base.model
Class AnalyzableElementDependency<S extends IAnalyzableElement,T extends IAnalyzableElement>

java.lang.Object
  extended by org.pf.tools.cda.base.model.AnalyzableElementDependency<S,T>
All Implemented Interfaces:
IDependency<S,T>, IObjectProperties
Direct Known Subclasses:
ClassContainerDependency, ClassInformationDependency, ClassPackageDependency, SoftwareComponentDependency

public abstract class AnalyzableElementDependency<S extends IAnalyzableElement,T extends IAnalyzableElement>
extends java.lang.Object
implements IDependency<S,T>

Represents the dependency of one IAnalyzableElement (source) to another IAnalyzableElement (target).

Version:
1.2
Author:
M.Duchrow

Field Summary
static java.lang.String TXT_EXTENDS
           
static java.lang.String TXT_IMPLEMENTS
           
static java.lang.String TXT_NEEDS
           
static java.lang.String TXT_USES
           
 
Method Summary
 ClassInformationDependency[] getClassDependencies()
          Returns all class dependencies that cause this higher level dependency.
 DependencyClassification getDependencyClassification()
          Returns what kind of dependency it is
 java.lang.String getDependencyType()
          Returns the text ID for type of this dependency.
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns the property associated with the given name.
 java.lang.String[] getPropertyNames()
          Returns all currently known properties.
abstract  S getSourceElement()
          Returns the element that depends on the target element
abstract  T getTargetElement()
          Returns the element the source element depends on
 Workset getWorkset()
          Returns the workset this dependency belongs to
 void setProperty(java.lang.String propertyName, java.lang.Object object)
          Sets the value of the property with the specified name to the given object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TXT_NEEDS

public static final java.lang.String TXT_NEEDS
See Also:
Constant Field Values

TXT_EXTENDS

public static final java.lang.String TXT_EXTENDS
See Also:
Constant Field Values

TXT_IMPLEMENTS

public static final java.lang.String TXT_IMPLEMENTS
See Also:
Constant Field Values

TXT_USES

public static final java.lang.String TXT_USES
See Also:
Constant Field Values
Method Detail

getDependencyClassification

public DependencyClassification getDependencyClassification()
Description copied from interface: IDependency
Returns what kind of dependency it is

Specified by:
getDependencyClassification in interface IDependency<S extends IAnalyzableElement,T extends IAnalyzableElement>

getSourceElement

public abstract S getSourceElement()
Description copied from interface: IDependency
Returns the element that depends on the target element

Specified by:
getSourceElement in interface IDependency<S extends IAnalyzableElement,T extends IAnalyzableElement>

getTargetElement

public abstract T getTargetElement()
Description copied from interface: IDependency
Returns the element the source element depends on

Specified by:
getTargetElement in interface IDependency<S extends IAnalyzableElement,T extends IAnalyzableElement>

getDependencyType

public java.lang.String getDependencyType()
Returns the text ID for type of this dependency.


getClassDependencies

public ClassInformationDependency[] getClassDependencies()
Returns all class dependencies that cause this higher level dependency.

Returns:
returns an array of dependencies (never null)

getWorkset

public Workset getWorkset()
Returns the workset this dependency belongs to


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns the property associated with the given name. A null value indicates that a property with the specified name does not exist.

Specified by:
getProperty in interface IObjectProperties
Parameters:
propertyName - A valid name (must not be null or empty string)
Returns:
The object associated with the given name or null if property unknown

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object object)
Sets the value of the property with the specified name to the given object. This replaces ny object that might have been kept under the given name before.

If the given object is null, the property and any associated value will be removed.

Specified by:
setProperty in interface IObjectProperties
Parameters:
propertyName - A valid name (must not be null or empty string)
object - The object to keep under the specified property name

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns all currently known properties. If no property is known an empty array will be returned (never null).

Specified by:
getPropertyNames in interface IObjectProperties
Returns:
All the names of available properties