mbeckerle 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_r401562816
##########
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:
This is because I copied code from JAPI to SAPI when I thought they were
identical, but they were not. The "code" was identical, not the scaladoc
comments. Will fix.
----------------------------------------------------------------
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