de.dhbwstuttgart.typeinference.unify

## Class CSubstitution

- java.lang.Object
- - de.dhbwstuttgart.typeinference.unify.CSubstitution

- Direct Known Subclasses:
    CSubstitutionGenVar

      public class CSubstitution
      extends java.lang.Object

  Implementierung einer Typsubstitution. Bildet eine zu ersetzende `TypePlaceholder` auf einen Substitutions-Typ ab. Instanzen dieser Klasse werden in der Regel aus `Pair`-Objekten erzeugt.
  Version:
    $Date: 2006/07/10 11:27:04 $
  Author:
    JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Logger` | `inferencelog`
    `protected Type` | `m_Type`
    `private TypePlaceholder` | `m_TypeVar`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CSubstitution()`
    `CSubstitution(Pair unifier)`
    `CSubstitution(TypePlaceholder typeVar, Type type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private Type` | `applySubstitution(Type type, CSubstitution unifierSub)` Wendet die Ã¯Â¿Â½bergebene Substitution rekursiv auf den Ã¯Â¿Â½bergebenen Typ an.
    `Type` | `applyThisSubstitution(Type type)`
    `void` | `applyUnifier(CSubstitutionSet unifier)` Wendet den Unifier auf die rechte Seite dieser Substitution an.
    `CSubstitution` | `clone()`
    `boolean` | `equals(java.lang.Object obj)`
    `Type` | `getType()` Author: JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle
    `Type` | `getTypeVar()` Author: JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle
    `void` | `setType(Type type)` Author: JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle
    `void` | `setTypeVar(TypePlaceholder 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`

- - ### Field Detail

    - #### m_TypeVar

          private TypePlaceholder m_TypeVar

    - #### m_Type

          protected Type m_Type

    - #### inferencelog

          protected static Logger inferencelog

  - ### Constructor Detail

    - #### CSubstitution

          public CSubstitution()

    - #### CSubstitution

          public CSubstitution(TypePlaceholder 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 Type getTypeVar()

      Author: JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle
      Returns:
        Returns the TypeVar.

    - #### setTypeVar

          public void setTypeVar(TypePlaceholder 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`

    - #### applyUnifier

          public void applyUnifier(CSubstitutionSet unifier)

      Wendet den Unifier auf die rechte Seite dieser Substitution an.
      Author: JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle
      Parameters:
        `unifier` -

    - #### applySubstitution

          private Type applySubstitution(Type type,
                                         CSubstitution unifierSub)

      Wendet die Ã¯Â¿Â½bergebene Substitution rekursiv auf den Ã¯Â¿Â½bergebenen Typ an.
      Author: JÃ¯Â¿Â½rg BÃ¯Â¿Â½uerle
      Parameters:
        `type` - Der zu untersuchende Typ
        `unifierSub` - Die anzuwendende Substitution
      Returns:
        Den ermittelnden Typ

    - #### applyThisSubstitution

          public Type applyThisSubstitution(Type type)