Class ProtoSchema.MessageType

java.lang.Object
org.microproxy.contentviews.ProtoSchema.MessageType
Enclosing class:
ProtoSchema

public static final class ProtoSchema.MessageType extends Object
A message type: its full name and fields.
  • Method Details

    • fullName

      public String fullName()
      Returns the full name, such as example.Order.Item.
      Returns:
      the full name, such as example.Order.Item
    • fields

      public List<ProtoSchema.Field> fields()
      Returns the fields, in declaration order.
      Returns:
      the fields, in declaration order
    • field

      public ProtoSchema.Field field(int number)
      The field with number.
      Parameters:
      number - the field number
      Returns:
      the field, or null if the type declares none
    • field

      public ProtoSchema.Field field(String name)
      The field named name.
      Parameters:
      name - the field name
      Returns:
      the field, or null if the type declares none
    • enumType

      public Optional<ProtoSchema.EnumType> enumType(int number)
      The enum type of an enum field.
      Parameters:
      number - the field number
      Returns:
      the enum type, or empty if the field is not an enum or its type is unknown
    • mapEntry

      public boolean mapEntry()
      Returns whether this is the entry type of a map field (key = 1, value = 2).
      Returns:
      whether this is the entry type of a map field (key = 1, value = 2)
    • toString

      public String toString()
      Overrides:
      toString in class Object