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
- Alphabetic
- By Inheritance
Inherited
- BindingExtensions
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- implicit final class ScalaAnnotatedBindingBuilder[T] extends AnyVal
- implicit final class ScalaAnnotatedConstantBindingBuilder extends AnyVal
- implicit final class ScalaBinder extends AnyVal
- implicit final class ScalaConstantBindingBuilder extends AnyVal
- implicit final class ScalaLinkedBindingBuilder[T] extends AnyVal
- implicit final class ScalaScopedBindingBuilder extends AnyVal