Skip to content

Instantly share code, notes, and snippets.

@romartin
Created January 11, 2018 17:23
Show Gist options
  • Save romartin/82ca4d217d3200fb42044b7359d1f011 to your computer and use it in GitHub Desktop.
Save romartin/82ca4d217d3200fb42044b7359d1f011 to your computer and use it in GitHub Desktop.
public class FactoryTest {
public interface Converter {
public Object convert();
}
@Dependent
public class ConverterImpl implements Converter {
private final FactoryManager factoryManager;
@Inject
public ConverterImpl(FactoryManager factoryManager) {
this.factoryManager = factoryManager;
}
@Override
public Object convert() {
return null;
}
}
private final Instance<Converter> converters;
@Inject
public FactoryTest(Instance<Converter> converters) {
this.converters = converters;
}
public UserTaskConverter buildC1() {
return converters.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment