stevedlawrence commented on a change in pull request #343: Daffodil 2302 fixes
external variables API difficulties
URL: https://github.com/apache/incubator-daffodil/pull/343#discussion_r401557498
##########
File path: daffodil-sapi/src/main/scala/org/apache/daffodil/sapi/Daffodil.scala
##########
@@ -396,57 +460,117 @@ class LocationInSchemaFile private[sapi] (lsf:
SLocationInSchemaFile) {
/**
* Compiled version of a DFDL Schema, used to parse data and get the DFDL
infoset
*/
-class DataProcessor private[sapi] (dp: SDataProcessor)
+class DataProcessor private[sapi] (private var dp: SDataProcessor)
extends WithDiagnostics(dp)
with Serializable {
+ private def copy(dp: SDataProcessor = dp) = new DataProcessor(dp)
+
/**
* Enable/disable debugging.
*
- * Before enabling, [[DataProcessor.setDebugger]] must be called with a
non-null debugger.
+ * Before enabling, [[DataProcessor#setDebugger(DebuggerRunner)]] must be
called with a non-null debugger.
*
* @param flag true to enable debugging, false to disabled
*/
- def setDebugging(b: Boolean) = dp.setDebugging(b)
+ @deprecated("Use withDebugging.", "2.6.0")
+ def setDebugging(flag: Boolean) {
+ dp = dp.withDebugging(flag)
+ }
/**
- * Set the debugger runer
+ * Obtain a new [[DataProcessor]] instance with debugging enabled or
disabled.
+ *
+ * Before enabling, [[DataProcessor#withDebugger(DebuggerRunner)]] must be
called to obtain a [[DataProcessor]] with a non-null debugger.
Review comment:
When generating the scaladoc, I get warnings that this can't be found. I
think if you just use ``DataProcessor.withDebugger`` without the arguments it
should be able to find it. In scaladoc, if you provide arguments in a scaladoc
link, you have to include the parameter name. Same issue with ``setDebugger``
above.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services