MessageType

data class MessageType(val type: ProtoType, val location: Location, val documentation: String, val name: String, val declaredFields: List<Field>, val extensionFields: MutableList<Field>, val oneOfs: List<OneOf>, val nestedTypes: List<Type>, val nestedExtendList: List<Extend>, val extensionsList: List<Extensions>, reserveds: List<Reserved>, val options: Options, val syntax: Syntax) : Type

Constructors

Link copied to clipboard
constructor(type: ProtoType, location: Location, documentation: String, name: String, declaredFields: List<Field>, extensionFields: MutableList<Field>, oneOfs: List<OneOf>, nestedTypes: List<Type>, nestedExtendList: List<Extend>, extensionsList: List<Extensions>, reserveds: List<Reserved>, options: Options, syntax: Syntax)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open override val documentation: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:JvmName(name = "fields")
val fields: List<Field>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val location: Location
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val nestedExtendList: List<Extend>
Link copied to clipboard
open override val nestedTypes: List<Type>
Link copied to clipboard
Link copied to clipboard
open override val options: Options
Link copied to clipboard
Link copied to clipboard
open override val syntax: Syntax
Link copied to clipboard
open override val type: ProtoType

Functions

Link copied to clipboard
Link copied to clipboard
fun extensionField(qualifiedName: String): Field?

Returns the field with the qualified name qualifiedName, or null if this type has no such field.

Link copied to clipboard
Link copied to clipboard
fun field(tag: Int): Field?

Returns the field tagged tag, or null if this type has no such field.

fun field(name: String): Field?

Returns the field named name, or null if this type has no such field.

Link copied to clipboard
open override fun linkMembers(linker: Linker)
Link copied to clipboard
open override fun linkOptions(linker: Linker, syntaxRules: SyntaxRules, validate: Boolean)
Link copied to clipboard
fun oneOf(name: String): OneOf?

Returns the oneOf named name, or null if this type has no such oneOf.

Link copied to clipboard
open override fun retainAll(schema: Schema, markSet: MarkSet): Type?
Link copied to clipboard
open override fun retainLinked(linkedTypes: Set<ProtoType>, linkedFields: Set<Field>): Type?

Returns a copy of this containing only the types in linkedTypes and extensions in linkedFields, or null if that set is empty. This will return an EnclosingType if it is itself not linked, but its nested types are linked.

Link copied to clipboard
fun toElement(): MessageElement
Link copied to clipboard

Returns all types and subtypes which are linked to the type.

Link copied to clipboard
open override fun validate(linker: Linker, syntaxRules: SyntaxRules)