google / google/guice

Feature request: just-in-time binding resolution through SPI

Open
#1,128 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

Let's imagine that I wish to inject some values which cannot be provided to injector ahead of time. For example, I wish to provide a complex DTO based on my config values:

```
class Something @Inject() (@ConfigValue("x.y.z") value: MyValue) {...}
```

Right now I have no any sane way to do that as far as I can understand.

Though in some situations such functionality would be priceless.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.