@Test public void getDerivedFieldMethodDeclarationSupportedExpression() { for (Supplier<Expression> supplier : supportedExpressionSupplier) { DerivedField derivedField = derivedFieldCreator.apply(supplier); try { DerivedFieldFunctionUtils.getDerivedFieldMethodDeclaration(derivedField, new AtomicInteger()); } catch (Exception e) { fail(String.format("Unexpected %s for %s", e, derivedField.getExpression().getClass())); } } }
static MethodDeclaration getDerivedFieldMethodDeclaration(final DerivedField derivedField, final AtomicInteger arityCounter) { final Expression expression = derivedField.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(expression, derivedField.getDataType(), arityCounter); } else { throw new KiePMMLException("Derived field without Expression are not supported, yet"); } }
DerivedFieldFunctionUtils { static MethodDeclaration getDerivedFieldMethodDeclaration(final DerivedField derivedField, final AtomicInteger arityCounter) { final Expression expression = derivedField.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(expression, derivedField.getDataType(), arityCounter); } else { throw new KiePMMLException("Derived field without Expression are not supported, yet"); } } }
DerivedFieldFunctionUtils { static MethodDeclaration getDerivedFieldMethodDeclaration(final DerivedField derivedField, final AtomicInteger arityCounter) { final Expression expression = derivedField.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(expression, derivedField.getDataType(), arityCounter); } else { throw new KiePMMLException("Derived field without Expression are not supported, yet"); } } private  DerivedFieldFunctionUtils(); }
DerivedFieldFunctionUtils { static MethodDeclaration getDerivedFieldMethodDeclaration(final DerivedField derivedField, final AtomicInteger arityCounter) { final Expression expression = derivedField.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(expression, derivedField.getDataType(), arityCounter); } else { throw new KiePMMLException("Derived field without Expression are not supported, yet"); } } private  DerivedFieldFunctionUtils();  }
DerivedFieldFunctionUtils { static MethodDeclaration getDerivedFieldMethodDeclaration(final DerivedField derivedField, final AtomicInteger arityCounter) { final Expression expression = derivedField.getExpression(); if (expression != null) { return getExpressionMethodDeclaration(expression, derivedField.getDataType(), arityCounter); } else { throw new KiePMMLException("Derived field without Expression are not supported, yet"); } } private  DerivedFieldFunctionUtils();   }