At the moment I use Assisted Injection with Named Parameters like this:
public interface Factory {
public MyObject create(@Assisted("string1") String string1, @Assisted("string2") String string2);
}
This works great. But I think it is a bit ugly to use Strings as Identifier for my parameters. What I would want to do is the following:
public interface Factory {
public MyObject create(@String1 String string1, @String2 String string2);
}
So essentially I want custom Assisted Annotations. Is there a way to do this?