Refactor super invocation setting
---------------------------------
Key: DROOLS-5603
URL:
https://issues.redhat.com/browse/DROOLS-5603
Project: Drools
Issue Type: Task
Reporter: Gabriele Cardosi
Assignee: Gabriele Cardosi
Priority: Major
Labels: TrustyAI
Currently in sources generation the super invocation is managed by field index
{code:java}
// Some comments here
ExplicitConstructorInvocationStmt superStatement = (ExplicitConstructorInvocationStmt)
statement;
NameExpr algorithmNameExpr = (NameExpr) superStatement.getArgument(2);
algorithmNameExpr.setName(String.format("\"%s\"",
treeModel.getAlgorithmName()));
{code}
This must be changed so that field to be set is looked for by name and - if not found, an
exception must be thrown (as for the AssignExpr)