Class EnumMappingConstructor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit fromEnumEntry(TO $self, FROM source) Explicitly construct a mapping to TO from source entry source.
      final Unit thrownByEnumEntry(Throwable $self, FROM source) Explicitly construct a mapping to throw an exception from source entry source.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnumMappingConstructor

        EnumMappingConstructor()
    • Method Detail

      • fromEnumEntry

         final Unit fromEnumEntry(TO $self, FROM source)

        Explicitly construct a mapping to TO from source entry source.

        For example

        Colour.UNKNOWN fromEnumEntry Color.ORANGE

        will generate an explicit mapping, mapping Colour.ORANGE to Color.UNKNOWN.

      • thrownByEnumEntry

         final Unit thrownByEnumEntry(Throwable $self, FROM source)

        Explicitly construct a mapping to throw an exception from source entry source.

        For example

        IllegalStateException() fromEnumEntry Color.ORANGE

        will generate an explicit mapping, mapping Colour.ORANGE to an IllegalStateException being thrown.