AnnotatedType<GenericPermissionVoter> permissionVoterAnnotatedType = beanManager
.createAnnotatedType(GenericPermissionVoter.class);
InjectionTarget<GenericPermissionVoter> voterInjectionTarget = beanManager
.createInjectionTarget(permissionVoterAnnotatedType);
NamedPermission namedPermission;
String beanName;
for (Object permission : constants) {
namedPermission = (NamedPermission) permission;
beanName = nameFactory.generatePermissionBeanName(namedPermission.name());
Bean<GenericPermissionVoter> bean = new BeanBuilder<GenericPermissionVoter>(beanManager)
.passivationCapable(false).beanClass(GenericPermissionVoter.class)
.injectionPoints(voterInjectionTarget.getInjectionPoints()).name(beanName)
.scope(ApplicationScoped.class).addQualifier(new NamedLiteral(beanName))