org.pf.tools.cda.base.model
Class ClassInformationDependency

java.lang.Object
  extended by org.pf.tools.cda.base.model.AnalyzableElementDependency<ClassInformation,ClassInformation>
      extended by org.pf.tools.cda.base.model.ClassInformationDependency
All Implemented Interfaces:
IDependency<ClassInformation,ClassInformation>, IObjectProperties

public class ClassInformationDependency
extends AnalyzableElementDependency<ClassInformation,ClassInformation>

Represents the dependency of one class (source) to another class (target)

Version:
1.0
Author:
M.Duchrow

Field Summary
static ClassInformationDependency[] EMPTY_ARRAY
           
static java.lang.String EXTENDS
           
static java.lang.String IMPLEMENTS
           
static java.lang.String USES
           
 
Fields inherited from class org.pf.tools.cda.base.model.AnalyzableElementDependency
TXT_EXTENDS, TXT_IMPLEMENTS, TXT_NEEDS, TXT_USES
 
Constructor Summary
ClassInformationDependency(ClassInformation fromClass, ClassInformation toClass)
          Initialize the new instance with default values.
ClassInformationDependency(ClassInformation fromClass, ClassInformation toClass, DependencyClassification type)
          Initialize the new instance.
 
Method Summary
static ClassInformationDependency[] collectionToArray(java.util.Collection coll)
           
 java.lang.String getDependencyType()
          Returns the text ID for type of this dependency.
 ClassInformation getSource()
           
 ClassInformation getSourceElement()
          Returns the element that depends on the target element
 ClassInformation getTarget()
           
 ClassInformation getTargetElement()
          Returns the element the source element depends on
 boolean isExtendsDependency()
           
 boolean isImplementsDependency()
           
 boolean isInheritanceDependency()
          Returns true if the dependency is due to an inheritance (i.e. extends or implements).
 boolean isUsesDependency()
           
 
Methods inherited from class org.pf.tools.cda.base.model.AnalyzableElementDependency
getClassDependencies, getDependencyClassification, getProperty, getPropertyNames, getWorkset, setProperty, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final ClassInformationDependency[] EMPTY_ARRAY

EXTENDS

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

IMPLEMENTS

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

USES

public static final java.lang.String USES
See Also:
Constant Field Values
Constructor Detail

ClassInformationDependency

public ClassInformationDependency(ClassInformation fromClass,
                                  ClassInformation toClass)
Initialize the new instance with default values.


ClassInformationDependency

public ClassInformationDependency(ClassInformation fromClass,
                                  ClassInformation toClass,
                                  DependencyClassification type)
Initialize the new instance.

Parameters:
fromClass - The class which depends on the toClass
toClass - The class the fromClass depends on
type - The dependency type.
Method Detail

getSource

public ClassInformation getSource()

getTarget

public ClassInformation getTarget()

collectionToArray

public static ClassInformationDependency[] collectionToArray(java.util.Collection coll)

isUsesDependency

public boolean isUsesDependency()

isExtendsDependency

public boolean isExtendsDependency()

isImplementsDependency

public boolean isImplementsDependency()

isInheritanceDependency

public boolean isInheritanceDependency()
Returns true if the dependency is due to an inheritance (i.e. extends or implements).


getSourceElement

public ClassInformation getSourceElement()
Returns the element that depends on the target element

Specified by:
getSourceElement in interface IDependency<ClassInformation,ClassInformation>
Specified by:
getSourceElement in class AnalyzableElementDependency<ClassInformation,ClassInformation>

getTargetElement

public ClassInformation getTargetElement()
Returns the element the source element depends on

Specified by:
getTargetElement in interface IDependency<ClassInformation,ClassInformation>
Specified by:
getTargetElement in class AnalyzableElementDependency<ClassInformation,ClassInformation>

getDependencyType

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

Overrides:
getDependencyType in class AnalyzableElementDependency<ClassInformation,ClassInformation>