class 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();

}