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

NewSchemaLoader

class NewSchemaLoader : Closeable

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, sourcePath: List<Location>, protoPath: List<Location> = listOf())

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

sourceLocationPaths

lateinit var sourceLocationPaths: Set<String>

Source files that were loaded. Used to differentiate sources from protoPath elements.

Functions

close

fun close(): Unit

load

fun load(): List<ProtoFile>

loadDescriptorProto

fun loadDescriptorProto(): ProtoFile

Returns Google's protobuf descriptor, which defines standard options like default, deprecated, and java_package. If the user has provided their own version of the descriptor proto, that is preferred.