@Test public void setConstructor() { ConstructorDeclaration constructorDeclaration = classOrInterfaceDeclaration.getDefaultConstructor().get(); SimpleName simpleName = new SimpleName("SIMPLENAME"); KiePMMLScorecardModelFactory.setConstructor(scorecardModel, constructorDeclaration, simpleName); Map<Integer, Expression> superInvocationExpressionsMap = new HashMap<>(); superInvocationExpressionsMap.put(0, new NameExpr(String.format("\"%s\"", scorecardModel.getModelName()))); Map<String, Expression> assignExpressionMap = new HashMap<>(); assignExpressionMap.put("targetField", new NameExpr("targetField")); assignExpressionMap.put("miningFunction", new NullLiteralExpr()); assignExpressionMap.put("pmmlMODEL", new NullLiteralExpr()); assertTrue(commonEvaluateConstructor(constructorDeclaration, simpleName.asString(), superInvocationExpressionsMap, assignExpressionMap)); }
static void setConstructor(final Scorecard scorecard, final ConstructorDeclaration constructorDeclaration, final SimpleName modelName) { setConstructorSuperNameInvocation(modelName.asString(), constructorDeclaration, scorecard.getModelName()); }
KiePMMLScorecardModelFactory { static void setConstructor(final Scorecard scorecard, final ConstructorDeclaration constructorDeclaration, final SimpleName modelName) { setConstructorSuperNameInvocation(modelName.asString(), constructorDeclaration, scorecard.getModelName()); } }
KiePMMLScorecardModelFactory { static void setConstructor(final Scorecard scorecard, final ConstructorDeclaration constructorDeclaration, final SimpleName modelName) { setConstructorSuperNameInvocation(modelName.asString(), constructorDeclaration, scorecard.getModelName()); } private  KiePMMLScorecardModelFactory(); }
KiePMMLScorecardModelFactory { static void setConstructor(final Scorecard scorecard, final ConstructorDeclaration constructorDeclaration, final SimpleName modelName) { setConstructorSuperNameInvocation(modelName.asString(), constructorDeclaration, scorecard.getModelName()); } private  KiePMMLScorecardModelFactory(); static KiePMMLScorecardModel getKiePMMLScorecardModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Scorecard model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); static Map<String, String> getKiePMMLScorecardModelSourcesMap(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Scorecard model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final String packageName); static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary,
                                                       final Scorecard model,
                                                       final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                       final List<KiePMMLDroolsType> types); }
KiePMMLScorecardModelFactory { static void setConstructor(final Scorecard scorecard, final ConstructorDeclaration constructorDeclaration, final SimpleName modelName) { setConstructorSuperNameInvocation(modelName.asString(), constructorDeclaration, scorecard.getModelName()); } private  KiePMMLScorecardModelFactory(); static KiePMMLScorecardModel getKiePMMLScorecardModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Scorecard model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); static Map<String, String> getKiePMMLScorecardModelSourcesMap(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Scorecard model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final String packageName); static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary,
                                                       final Scorecard model,
                                                       final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                       final List<KiePMMLDroolsType> types);  }