}
@Override
public GenericRoleVoter create(Bean<GenericRoleVoter> bean,
CreationalContext<GenericRoleVoter> creationalContext) {
GenericRoleVoter result = super.create(bean, creationalContext);
// We can't move this to the Extension itself.
// The producer of this RoleLookup goes to the database and this isn't possible until we are completely ready.
RoleLookup<? extends NamedRole> roleLookup = CDIUtil.getBeanManually(RoleLookup.class);
if (roleLookup == null) {
throw new OctopusConfigurationException("When using the named roles, please configure them with the RoleLookup. See manual ??? TODO");
}
result.setNamedRole(roleLookup.getRole(namedRole.name()));
return result;
}