Class NameCustomSection


public final class NameCustomSection extends CustomSection
The "name" custom section.
  • Method Details

    • parse

      public static NameCustomSection parse(byte[] bytes)
      Parse a new instance from a byte array.
      Parameters:
      bytes - the byte content of the section
    • name

      public String name()
      Specified by:
      name in class CustomSection
    • moduleName

      public Optional<String> moduleName()
      Returns:
      the optional module name
    • nameOfFunction

      public String nameOfFunction(int functionIdx)
      Returns:
      the name of the function with the given index, or null if none is set
    • functionNameCount

      public int functionNameCount()
      Returns:
      the number of function names in this section This value does not have any relationship to the function index of any particular entry; it merely reflects the number of function names in this section. Used for testing.
    • nameOfLocal

      public String nameOfLocal(int functionIdx, int localIdx)
      Returns:
      the name of the local with the given index within the function with the given index, or null if none is set
    • nameOfLabel

      public String nameOfLabel(int functionIdx, int labelIdx)
      Returns:
      the name of the local with the given index within the function with the given index, or null if none is set
    • nameOfTable

      public String nameOfTable(int tableIdx)
      Returns:
      the name of the table with the given index, or null if none is set
    • nameOfMemory

      public String nameOfMemory(int memoryIdx)
      Returns:
      the name of the memory with the given index, or null if none is set
    • nameOfGlobal

      public String nameOfGlobal(int globalIdx)
      Returns:
      the name of the global with the given index, or null if none is set
    • nameOfElement

      public String nameOfElement(int elementIdx)
      Returns:
      the name of the element with the given index, or null if none is set
    • nameOfData

      public String nameOfData(int dataIdx)
      Returns:
      the name of the data segment with the given index, or null if none is set
    • nameOfTag

      public String nameOfTag(int tagIdx)
      Returns:
      the name of the tag with the given index, or null if none is set