Skip to content

Commit

Permalink
Added javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepalladino-apuliasoft committed Mar 22, 2024
1 parent 35f3c4c commit 094838f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ data class JarikoCallback(
var onCallPgmError: (errorEvent: ErrorEvent) -> Unit = { },
var logInfo: ((channel: String, message: String) -> Unit)? = null,
var channelLoggingEnabled: ((channel: String) -> Boolean)? = null,
/**
* This is called for those statements mocked.
* @param mockStatement "Statement" where is get its name for the `println`.
*/
var onMockStatement: ((mockStatement: MockStatement) -> Unit) = { System.err.println("Executing mock: ${it.javaClass.simpleName}") }
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ abstract class Statement(
abstract fun execute(interpreter: InterpreterCore)
}

/**
* For statements with this interface there isn't execution but will be called the callback `onMockStatement`.
*/
interface MockStatement

interface CompositeStatement {
Expand Down

0 comments on commit 094838f

Please sign in to comment.