Class GoInterfaceType

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

public class GoInterfaceType extends GoType
A GoType structure that defines a golang interface.
  • Constructor Details

    • GoInterfaceType

      public GoInterfaceType()
  • Method Details

    • getPkgPath

      public GoName getPkgPath() throws IOException
      Returns the package path of this type, referenced via the pkgpath field's markup annotation
      Returns:
      package path GoNamea
      Throws:
      IOException - if error reading
    • getMethodsSlice

      public GoSlice getMethodsSlice()
      Returns a slice containing the methods of this interface.
      Returns:
      slice containing the methods of this interface
    • getMethods

      public List<GoIMethod> getMethods() throws IOException
      Returns the methods defined by this interface
      Returns:
      methods defined by this interface
      Throws:
      IOException - if error reading data
    • additionalMarkup

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

      public DataType recoverDataType() throws IOException
      Description copied from class: GoType
      Converts a golang RTTI type structure into a Ghidra data type.
      Overrides:
      recoverDataType in class GoType
      Returns:
      DataType that represents the golang type
      Throws:
      IOException - if error getting name of the type
    • getMethodListString

      public String getMethodListString() throws IOException
      Overrides:
      getMethodListString in class GoType
      Throws:
      IOException
    • discoverGoTypes

      public boolean discoverGoTypes(Set<Long> discoveredTypes) throws IOException
      Description copied from class: GoType
      Iterates this type, and any types this type refers to, while registering the types with the GoRttiMapper context.

      This method should be overloaded by derived type classes to add any additional types referenced by the derived type.

      Overrides:
      discoverGoTypes in class GoType
      Parameters:
      discoveredTypes - set of already iterated types
      Returns:
      boolean boolean flag, if false the type has already been discovered, if true the type was encountered for the first time
      Throws:
      IOException - if error reading type info