Class DefaultTypeConversion

Design decisions:

  • Do not store transitive relationships, since they must be removed, when types of the corresponding path are removed!
  • Store only EXPLICIT and IMPLICIT relationships, since this is not required, missing edges means NONE/SELF.

Implements

Constructors

Properties

equality: TypeEquality
graph: TypeGraph

Methods

  • Checks whether the given two types are convertible (EXPLICIT or IMPLICIT or SELF).

    Parameters

    • from: Type

      the from/source type

    • to: Type

      the to/target type

    Returns boolean

    true if the implicit or explicit conversion is possible or the types are equal, false otherwise