@Test public void getDefineFunctionMethodDeclarationSupportedExpression() { for (Supplier<Expression> supplier : supportedExpressionSupplier) { DefineFunction defineFunction = defineFunctionCreator.apply(supplier); try { DefineFunctionUtils.getDefineFunctionMethodDeclaration(defineFunction); } catch (Exception e) { fail(String.format("Unexpected %s for %s", e, defineFunction.getExpression().getClass())); } } }
static MethodDeclaration getDefineFunctionMethodDeclaration(final DefineFunction defineFunction) { final Expression expression = defineFunction.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(defineFunction.getName(), expression, defineFunction.getDataType(), defineFunction.getParameterFields()); } else { throw new KiePMMLException("Define Function without Expression are not supported, yet"); } }
DefineFunctionUtils { static MethodDeclaration getDefineFunctionMethodDeclaration(final DefineFunction defineFunction) { final Expression expression = defineFunction.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(defineFunction.getName(), expression, defineFunction.getDataType(), defineFunction.getParameterFields()); } else { throw new KiePMMLException("Define Function without Expression are not supported, yet"); } } }
DefineFunctionUtils { static MethodDeclaration getDefineFunctionMethodDeclaration(final DefineFunction defineFunction) { final Expression expression = defineFunction.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(defineFunction.getName(), expression, defineFunction.getDataType(), defineFunction.getParameterFields()); } else { throw new KiePMMLException("Define Function without Expression are not supported, yet"); } } private  DefineFunctionUtils(); }
DefineFunctionUtils { static MethodDeclaration getDefineFunctionMethodDeclaration(final DefineFunction defineFunction) { final Expression expression = defineFunction.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(defineFunction.getName(), expression, defineFunction.getDataType(), defineFunction.getParameterFields()); } else { throw new KiePMMLException("Define Function without Expression are not supported, yet"); } } private  DefineFunctionUtils();  }
DefineFunctionUtils { static MethodDeclaration getDefineFunctionMethodDeclaration(final DefineFunction defineFunction) { final Expression expression = defineFunction.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(defineFunction.getName(), expression, defineFunction.getDataType(), defineFunction.getParameterFields()); } else { throw new KiePMMLException("Define Function without Expression are not supported, yet"); } } private  DefineFunctionUtils();   }