* @return ClassFieldReader
* @throws IllegalArgumentException thrown if the AlphaNode's {@link org.kie.spi.AlphaNodeFieldConstraint} is not a
* {@link MvelConstraint}.
*/
private ClassFieldReader getClassFieldReaderForHashedAlpha(final AlphaNode alphaNode) throws IllegalArgumentException {
final AlphaNodeFieldConstraint fieldConstraint = alphaNode.getConstraint();
if (!(fieldConstraint instanceof MvelConstraint)) {
throw new IllegalArgumentException("Only support MvelConstraint hashed AlphaNodes, not " + fieldConstraint.getClass());
}
// we need to get the first alpha in the map to get the attribute name that be use for the prefix of the
// generated variable name
return (ClassFieldReader) ((MvelConstraint)fieldConstraint).getFieldExtractor();
}