java.lang.Object
ghidra.app.util.bin.format.golang.rtti.GoItab
All Implemented Interfaces:
StructureMarkup<GoItab>

public class GoItab extends Object implements StructureMarkup<GoItab>
Represents a mapping between a golang interface and a type that implements the methods of the interface.
  • Constructor Details

    • GoItab

      public GoItab()
  • Method Details

    • getInterfaceType

      public GoInterfaceType getInterfaceType() throws IOException
      Returns the interface implemented by the specified type.
      Returns:
      interface implemented by the specified type
      Throws:
      IOException - if error reading ref'd interface structure
    • getType

      public GoType getType() throws IOException
      Returns the type that implements the specified interface.
      Returns:
      type that implements the specified interface
      Throws:
      IOException - if error reading the ref'd type structure
    • getFuncCount

      public long getFuncCount() throws IOException
      Return the number of methods implemented.
      Returns:
      number of methods implemented
      Throws:
      IOException - if error reading interface structure
    • getFunSlice

      public GoSlice getFunSlice() throws IOException
      Returns an artificial slice that contains the address of the functions that implement the interface methods.
      Returns:
      artificial slice that contains the address of the functions that implement the interface methods
      Throws:
      IOException - if error reading method info
    • getMethodInfoList

      public List<GoIMethod.GoIMethodInfo> getMethodInfoList() throws IOException
      Returns list of GoIMethod.GoIMethodInfo instances, that represent the methods implemented by the specified type / interface.
      Returns:
      list of GoIMethod.GoIMethodInfo instances
      Throws:
      IOException - if error reading interface method list
    • getStructureName

      public String getStructureName() throws IOException
      Description copied from interface: StructureMarkup
      Returns the name of the instance, typically retrieved from data found inside the instance.
      Specified by:
      getStructureName in interface StructureMarkup<GoItab>
      Returns:
      string name, or null if this instance does not have a name
      Throws:
      IOException - if error getting name
    • getStructureContext

      public StructureContext<GoItab> getStructureContext()
      Specified by:
      getStructureContext in interface StructureMarkup<GoItab>
    • getStructureLabel

      public String getStructureLabel() throws IOException
      Description copied from interface: StructureMarkup
      Returns a string that can be used to place a label on the instance.

      This default implementation will query the StructureMarkup.getStructureName() method, and if it provides a value, will produce a string that looks like "name___mappingstructname", where "mappingstructname" will be the structureName value in the @StructureMapping annotation.

      Specified by:
      getStructureLabel in interface StructureMarkup<GoItab>
      Returns:
      string to be used as a label, or null if there is not a valid label for the instance
      Throws:
      IOException - if error getting label
    • getStructureNamespace

      public String getStructureNamespace() throws IOException
      Description copied from interface: StructureMarkup
      Returns the namespace that any labels should be placed in.
      Specified by:
      getStructureNamespace in interface StructureMarkup<GoItab>
      Returns:
      name of namespace to place the label for this structure mapped type, or null
      Throws:
      IOException - if error generating namespace name
    • additionalMarkup

      public void additionalMarkup(MarkupSession session) throws IOException
      Description copied from interface: StructureMarkup
      Called to allow the implementor to perform custom markup of itself.
      Specified by:
      additionalMarkup in interface StructureMarkup<GoItab>
      Parameters:
      session - state and methods to assist marking up the program
      Throws:
      IOException - if error during markup
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • discoverGoTypes

      public void discoverGoTypes(Set<Long> discoveredTypes)