PrologRuleLoader

Loads Prolog rules from files or classpath resources.

Functions

Link copied to clipboard
fun loadFromFile(filePath: String): String

Load rules from a file path.

Link copied to clipboard
fun loadFromResource(resourcePath: String = DICE_RULES_RESOURCE_PATH, classLoader: ClassLoader = Thread.currentThread().contextClassLoader): String

Load rules from a classpath resource.

Link copied to clipboard

Load rules from an input stream.

Link copied to clipboard
fun loadMultiple(vararg paths: String): String

Load and combine multiple rule files.

Link copied to clipboard
fun tryLoadFromResource(resourcePath: String = DICE_RULES_RESOURCE_PATH, classLoader: ClassLoader = Thread.currentThread().contextClassLoader): String?

Try to load rules from a classpath resource, returning null if not found.