Packages

abstract class PluginDef[T] extends PluginBase with ModuleDef

Use it to define Plugins using izumi.distage.model.definition.dsl.ModuleDefDSL syntax

object MyPlugin extends PluginDef {
  include(myModule[F])

  make[Xa[F]].from[Xa.Impl[F]]
}
Note

Since this is an abstract class, you cannot mix it with other classes or use it as a mixin. Instead, you may inherit from PluginBase, which is a trait – but in that case compile-time checks will not re-run when the class is updated in that case. Alternatively, you may use izumi.distage.model.definition.dsl.IncludesDSL#include to compose modules as values instead of using inheritance.

See also

Plugins

Compile-time checks

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PluginDef
  2. ModuleDef
  3. ModuleDefDSL
  4. TagsDSL
  5. IncludesDSL
  6. AbstractBindingDefDSL
  7. AbstractBindingDefDSLMacro
  8. Module
  9. PluginBase
  10. ModuleBase
  11. CachedHashcode
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PluginDef()(implicit recompilationToken: ForcedRecompilationToken[T])

    recompilationToken

    Makes compile-time checks re-run when the source code of this PluginDef is changed, if it's used in the checked role.

Type Members

  1. final class MutationContext extends AnyRef

    Use this to create utility functions that add bindings mutably to the current module, as opposed to creating new modules and including them.

    Use this to create utility functions that add bindings mutably to the current module, as opposed to creating new modules and including them.

    Example:

    import distage.{ClassConstructor, Tag, ModuleDef}
    import izumi.distage.model.definition.dsl.ModuleDefDSL
    
    trait RegisteredComponent
    class RegisteredComponentImpl extends RegisteredComponent
    
    def addAndRegister[T <: RegisteredComponent: Tag: ClassConstructor](implicit mutateModule: ModuleDefDSL#MutationContext): Unit = {
      new mutateModule.dsl {
        make[T]
    
        many[RegisteredComponent]
          .weak[T]
      }
    }
    
    new ModuleDef {
      addAndRegister[RegisteredComponentImpl]
    }
    Definition Classes
    AbstractBindingDefDSL

Value Members

  1. final def bindings: Set[Binding]
    Definition Classes
    ModuleDefDSL
  2. final def equals(obj: Any): Boolean
    Definition Classes
    ModuleBase → AnyRef → Any
  3. final lazy val hashCode: Int
    Definition Classes
    CachedHashcode → AnyRef → Any
  4. final def iterator: Iterator[Binding]
    Definition Classes
    ModuleDefDSL
  5. final def keys: Set[DIKey]
    Definition Classes
    ModuleBase
  6. final def keysIterator: Iterator[DIKey]
    Definition Classes
    ModuleDefDSL
  7. final def toString(): String
    Definition Classes
    ModuleBase → AnyRef → Any