/*-------------------------------------------------------------------------------
Copyright (c)2000 TogetherSoft Corporation. Patents pending. All rights reserved.
-------------------------------------------------------------------------------*/
package com.togethersoft.modules.showdependencies;

import com.togethersoft.openapi.sci.SciClass;

/**
  * This class represents a dependency reason between two SciClasses.
  * Since this object contains information about only one code fragment,
  * which is kept in the CodeFragment object, there can be several Dependency
  * objects for the same SciClasses.
  *
  * @author TogetherSoft
  */
class Dependency
{
    /**
     * Creates class instance with specified parameters
     */
    public Dependency(SciClass victim, SciClass cause, CodeFragment codeFragment)
    {
        myVictim = victim;
        myCause = cause;
        myCodeFragment = codeFragment;
    }

    /**
     * Returns SciClass object victim
     */
    public SciClass getVictim()
    {
        return myVictim;
    }

    /**
     * Returns SciClass object cause
     */
    public SciClass getCause()
    {
        return myCause;
    }

    /**
     * Returns CodeFragment object
     */
    public CodeFragment getCodeFragment()
    {
        return myCodeFragment;
    }

    private SciClass myVictim;
    private SciClass myCause;
    private CodeFragment myCodeFragment;

}


