wire-compiler / com.squareup.wire.schema / NewSchemaLoader

NewSchemaLoader

class NewSchemaLoader : Closeable, Loader, NewProfileLoader

Load proto files and their transitive dependencies and parse them. Keep track of which files were loaded from where so that we can use that information later when deciding what to generate.

Constructors

<init>

NewSchemaLoader(fs: FileSystem)

Load proto files and their transitive dependencies and parse them. Keep track of which files were loaded from where so that we can use that information later when deciding what to generate.

Properties

sourcePathFiles

lateinit var sourcePathFiles: List<ProtoFile>

Subset of the schema that was loaded from the source path.

Functions

close

fun close(): Unit

initRoots

fun initRoots(sourcePath: List<Location>, protoPath: List<Location> = listOf()): Unit

Initialize the WireRun.sourcePath and WireRun.protoPath from which files are loaded.

load

fun load(path: String): ProtoFile

loadProfile

fun loadProfile(name: String, schema: Schema): Profile

loadSchema

fun loadSchema(): Schema