Open
Description
I was thinking about how quarkus injects a proxy for lazy beans, and it seems pretty convenient.
Given a class:
@Lazy
@Singleton
class SomeClass {
void something(){
//something
}
}
Something like the following should be work:
public class ExampleService {
private final SomeClass some;
public ExampleService(SomeClass some) {
this.some = some; // a generated proxy class is wired
}
public void example() {
some.something(); //someclass is initialized here
}
}