Class MessageType


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

      • 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 Detail

      • 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)
      • checkContains

        public void checkContains​(Type subType)
      • convertWith

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

        public boolean containsPath​(String[] path)