Class MessageType


public final class MessageType extends GroupType
The root of a schema
  • Constructor Details

    • MessageType

      public MessageType(String name, Type... fields)
      Parameters:
      name - the name of the type
      fields - the fields contained by this message
    • MessageType

      public MessageType(String name, List<Type> fields)
      Parameters:
      name - the name of the type
      fields - the fields contained by this message
  • Method Details

    • accept

      public void accept(TypeVisitor visitor)
      Visits this type with the given visitor
      Overrides:
      accept in class GroupType
      Parameters:
      visitor - the visitor to visit this type
    • writeToStringBuilder

      public void writeToStringBuilder(StringBuilder sb, String indent)
      Writes a string representation to the provided StringBuilder
      Overrides:
      writeToStringBuilder in class GroupType
      Parameters:
      sb - the StringBuilder to write itself to
      indent - indentation level
    • getMaxRepetitionLevel

      public int getMaxRepetitionLevel(String... path)
      Parameters:
      path - an array of strings representing the name path in this type
      Returns:
      the max repetition level that might be needed to encode the type at 'path'.
    • getMaxDefinitionLevel

      public int getMaxDefinitionLevel(String... path)
      Parameters:
      path - an array of strings representing the name path in this type
      Returns:
      the max repetition level that might be needed to encode the type at 'path'.
    • getType

      public Type getType(String... path)
    • getColumnDescription

      public ColumnDescriptor getColumnDescription(String[] path)
    • getPaths

      public List<String[]> getPaths()
    • getColumns

      public List<ColumnDescriptor> getColumns()
    • checkContains

      public void checkContains(Type subType)
    • convertWith

      public <T> T convertWith(TypeConverter<T> converter)
    • containsPath

      public boolean containsPath(String[] path)
    • union

      public MessageType union(MessageType toMerge)
    • union

      public MessageType union(MessageType toMerge, boolean strict)