Class ProtocolMessageDocumentation

java.lang.Object
wtf.choco.veinminer.documentation.ProtocolMessageDocumentation

public final class ProtocolMessageDocumentation extends Object
Represents documentation for a protocol message.
  • Method Details

    • getDirection

      public MessageDirection getDirection()
      Get the MessageDirection of this message.
      Returns:
      the direction
    • getId

      public int getId()
      Get the unique id of this message.
      Returns:
      the unique id
    • getName

      public String getName()
      Get the name of this message.
      Returns:
      the name
    • getDescription

      public String getDescription()
      Get the description of this message.
      Returns:
      the description
    • getFields

      public List<MessageField> getFields()
      Get a list of all fields in this message.
      Returns:
      the fields
    • generateMessageMarkdown

      public String generateMessageMarkdown()
      Generate a Markdown-friendly formatted string containing the name, description, and HTML table of this message.
      Returns:
      the message Markdown
    • generateMessageHTMLTable

      public String generateMessageHTMLTable()
      Generate an HTML table containing all the fields in this message and their information.
      Returns:
      the message HTML table
    • builder

      public static ProtocolMessageDocumentation.Builder builder(MessageDirection direction, int messageId)
      Parameters:
      direction - the direction of the message being documented
      messageId - the id of the message being documented
      Returns:
      the builder instance