This is not necessary. WeldSEClassFileServices could just take JandexEnabledDiscoveryStrategy as constructor's parameter and take the index from there. In addition, why not do this within createDeployment() and avoid the strategy field?