processMethodContext.removeMethod(choicesMethod);
final FacetedMethod facetedMethod = processMethodContext.getFacetHolder();
if (facetedMethod.containsDoOpFacet(ActionChoicesFacet.class)) {
final Class<?> cls = processMethodContext.getCls();
throw new MetaModelException(cls + " uses both old and new choices syntax - must use one or other");
}
// add facets directly to parameters, not to actions
final FacetedMethodParameter paramAsHolder = parameters.get(i);
FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder, getSpecificationLoader(), getAdapterManager()));