Skip to content

Support Scala Set with Guice Multibindings #4

Open
@tsuckow

Description

Guice expects a java Set for multibindings requiring a second constructor to do the translation. It would be nice if we supported directly injecting a Scala mutable.Set

Have this:

class MyActor( val stuff:MutableSet[MyType] ) {
  @Inject() def this( stuff:java.util.Set[MyType] ) = this( asScalaSet(stuff) )

Want this:

class MyActor @Inject() ( val stuff:MutableSet[MyType] ) {

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions