mycompiler.mytypereconstruction
Class CSubstitution

java.lang.Object
  extended by mycompiler.mytypereconstruction.CSubstitution

public class CSubstitution
extends java.lang.Object

Implementierung einer Typsubstitution. Bildet eine zu ersetzende TyploseVariable auf einen Substitutions-Typ ab. Instanzen dieser Klasse werden in der Regel aus Pair-Objekten erzeugt.

Version:
$Date: 2005/06/28 19:19:10 $
Author:
Jörg Bäuerle

Constructor Summary
CSubstitution()
           
CSubstitution(Pair unifier)
           
CSubstitution(TyploseVariable typeVar, Type type)
           
 
Method Summary
 void applyUnifier(CSubstitutionSet unifier)
          Wendet den Unifier auf die rechte Seite dieser Substitution an.
 CSubstitution clone()
           
 boolean equals(java.lang.Object obj)
           
 void execute()
          Sucht die eindeutige Instanz der TyplosenVariable in der Registry der TyplosenVariablen des Syntaxbaumes und führt die Typsubstitution im Syntaxbaum durch.
 Type getType()
          Author: Jörg Bäuerle
 TyploseVariable getTypeVar()
          Author: Jörg Bäuerle
 void setType(Type type)
          Author: Jörg Bäuerle
 void setTypeVar(TyploseVariable typeVar)
          Author: Jörg Bäuerle
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CSubstitution

public CSubstitution()

CSubstitution

public CSubstitution(TyploseVariable typeVar,
                     Type type)

CSubstitution

public CSubstitution(Pair unifier)
              throws CTypeReconstructionException
Throws:
CTypeReconstructionException
Method Detail

getType

public Type getType()
Author: Jörg Bäuerle

Returns:
Returns the Type.

setType

public void setType(Type type)
Author: Jörg Bäuerle

Parameters:
type - The Type to set.

getTypeVar

public TyploseVariable getTypeVar()
Author: Jörg Bäuerle

Returns:
Returns the TypeVar.

setTypeVar

public void setTypeVar(TyploseVariable typeVar)
Author: Jörg Bäuerle

Parameters:
typeVar - The TypeVar to set.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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

clone

public CSubstitution clone()
Overrides:
clone in class java.lang.Object

execute

public void execute()
             throws CTypeReconstructionException
Sucht die eindeutige Instanz der TyplosenVariable in der Registry der TyplosenVariablen des Syntaxbaumes und führt die Typsubstitution im Syntaxbaum durch.
Author: Jörg Bäuerle wenn die TyploseVariable nicht in der Registry gefunden wurde.

Throws:
CTypeReconstructionException - Falls TyploseVariable nicht in Registry gefunden wird.

applyUnifier

public void applyUnifier(CSubstitutionSet unifier)
Wendet den Unifier auf die rechte Seite dieser Substitution an.
Author: Jörg Bäuerle

Parameters:
unifier -