stevedlawrence commented on a change in pull request #273: WIP: Add User 
Defined Functions Capability
URL: https://github.com/apache/incubator-daffodil/pull/273#discussion_r331490490
 
 

 ##########
 File path: 
daffodil-test/src/test/java/org/goodudfs/example/StringFunctions/StringFunctionsProvider.java
 ##########
 @@ -0,0 +1,25 @@
+package org.goodudfs.example.StringFunctions;
+
+import org.apache.daffodil.udf.*;
+
+public class StringFunctionsProvider extends UDFunctionProvider {
+       public StringFunctionsProvider() {
+               super.setFunctionClasses( new Class<?>[] { Replace.class, 
Compare.class } );
 
 Review comment:
   Instead of this, a maybe safer way would be to have an ``asbtract 
getFunctionClasses`` method that users must implement and it returns Class 
array. This way, if they don't implement that function thier UDF won't compile.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to