<commit_before>Scala extensions for Google Guice

Features:

* `Manifest[T]` -> `TypeLiteral[T]` conversion (`typeLiteral[T]`)
* Binding DSL extensions using type parameters to specify types
* ScalaModule trait including the above binding DSL extensions

```scala
  class MyModule extends AbstractModule with ScalaModule {
	def configure {
	  bind[Service].to[ServiceImpl].in[Singleton]
	  bind[CreditCardPaymentService]
	  bind[Bar[Foo]].to[FooBarImpl]
	  bind[PaymentService].to[CreditCardPaymentService]
	}
  }
```

Future:

* `TypeLiteral[T]` -> `Manifest[T]` conversion
* Have `Manifest[T]` injected anywhere Guice could inject `TypeLiteral[T]` (see [Jesse's post for context](http://blog.publicobject.com/2008/11/guice-punches-erasure-in-face.html))
* Extractor objects for pattern-matching against the binding AST

If technically possible:

* Inject `Option[T]` for optional dependencies
* Injection that takes variance into account

Build Server:

[Jenkins](http://ci.codingwell.net/job/Scala-Guice/)<commit_msg>Updating Readme for codingwell/scala-guice#5<commit_after>Scala extensions for Google Guice
=================================

Getting Started
---------------

Just add this maven dependency:
```xml
<dependency>
    <groupId>net.codingwell</groupId>
    <artifactId>scala-guice_2.9</artifactId>
    <version>3.0.1</version>
</dependency>
```

Mixin ScalaModule with your AbstractModule for rich scala magic (or ScalaPrivateModule with your PrivateModule):
```scala
class MyModule extends AbstractModule with ScalaModule {
  def configure {
    bind[Service].to[ServiceImpl].in[Singleton]
    bind[CreditCardPaymentService]
    bind[Bar[Foo]].to[FooBarImpl]
    bind[PaymentService].to[CreditCardPaymentService]
  }
}

class MyPrivateModule extends PrivateModule with ScalaPrivateModule {
  def configure {
    bind[Foo].to[RealFoo]
    expose[Foo]

    install(new TransactionalBarModule())
    expose[Bar].annotatedWith[Transactional]

    bind[SomeImplementationDetail]
    install(new MoreImplementationDetailsModule())
  }
}
```

Wrap the injector in a ScalaInjector for even more rich scala magic:
```scala
object MyServer {
  def main(args: Array[String]) {
    val injector = new ScalaInjector(Guice.createInjector(new MyModule(), new MyPrivateModule))

    val service = injector.instance[Service]
    val foo = injector.instance[Foo]
    ...
  }
}
```

Features:
---------

* `Manifest[T]` -> `TypeLiteral[T]` conversion (`typeLiteral[T]`)
* Binding DSL extensions using type parameters to specify types
* ScalaModule trait including the above binding DSL extensions
* PrivateModule support
* ScalaInjector wrapper over Injector

Future:
-------

* `TypeLiteral[T]` -> `Manifest[T]` conversion
* Have `Manifest[T]` injected anywhere Guice could inject `TypeLiteral[T]` (see [Jesse's post for context](http://blog.publicobject.com/2008/11/guice-punches-erasure-in-face.html))
* Extractor objects for pattern-matching against the binding AST

If technically possible:

* Inject `Option[T]` for optional dependencies
* Injection that takes variance into account

Build Server:
-------------

[Jenkins](http://ci.codingwell.net/job/Scala-Guice/)
{'fraction_non_alphanumeric': 0.13154574132492114, 'fraction_numerical': 0.0056782334384858045, 'mean_word_length': 4.905027932960894, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2381671', 'n_tokens_mistral': 999, 'n_tokens_neox': 936, 'n_words': 246}