Skip to content

Commit

Permalink
chore: add a new api for loading from file
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc authored Mar 18, 2021
1 parent e54d9ea commit 576f49b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ abstract class RandUnitBaseImpl {
return ret
}

@JvmOverloads
fun scanStatementsFromFile(
targetFile: File,
cfg: ScannerConfig? = null
): Iterable<StatementModel> = collectStatements(scanClassesFromFile(targetFile), cfg)

fun writeClassesToFile(clzList: Iterable<Class<*>>, targetFile: File) {
targetFile.printWriter().use { out ->
clzList.forEach {
Expand Down

0 comments on commit 576f49b

Please sign in to comment.