o

net.codingwell.scalaguice

BindingExtensions

object BindingExtensions

Extensions for Guice's binding DSL. These allow using a type parameter instead of classOf[Foo] or new TypeLiteral[Bar[Foo]] {}. The extra methods are named as those in the normal binding DSL suffixed with Type.

For example, instead of

binder.bind(new TypeLiteral[Bar[Foo]]{}).to(classOf[FooBarImpl])

use

import BindingExtensions._
binder.bindType[Bar[Foo]].toType[FooImpl]

Note This syntax allows binding to and from generic types. It doesn't currently allow bindings between wildcard types because the manifests for wildcard types don't provide access to type bounds.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BindingExtensions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit final class ScalaAnnotatedBindingBuilder[T] extends AnyVal
  2. implicit final class ScalaAnnotatedConstantBindingBuilder extends AnyVal
  3. implicit final class ScalaBinder extends AnyVal
  4. implicit final class ScalaConstantBindingBuilder extends AnyVal
  5. implicit final class ScalaLinkedBindingBuilder[T] extends AnyVal
  6. implicit final class ScalaScopedBindingBuilder extends AnyVal