android-components / mozilla.components.support.base.facts / FactProcessor

FactProcessor

interface FactProcessor (source)

A FactProcessor receives Fact instances to process them further.

Functions

Name Summary
process abstract fun process(fact: Fact): Unit
Passes the given Fact to the FactProcessor for processing.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.
register fun FactProcessor.register(): Facts
Registers this FactProcessor to collect Fact instances from the Facts singleton.

Inheritors

Name Summary
CollectionProcessor class CollectionProcessor : FactProcessor
A FactProcessor implementation that keeps all Fact objects in a list.
LogFactProcessor class LogFactProcessor : FactProcessor
A FactProcessor implementation that prints collected Fact instances to the log.