Record Class PcodeUseropLibrary.PcodeUseropSymbolMap

java.lang.Object
java.lang.Record
ghidra.pcode.exec.PcodeUseropLibrary.PcodeUseropSymbolMap
Record Components:
language - the language whose symbols are incorporated into retrieval
byIndex - the symbols by index, excluding those in the language already
byName - the symbols by name, excluding those in the language already
Enclosing interface:
PcodeUseropLibrary<T>

public static record PcodeUseropLibrary.PcodeUseropSymbolMap(SleighLanguage language, Map<Integer, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byIndex, Map<String, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byName) extends Record
A store of userop symbols, retrievable by index or name
  • Constructor Details

    • PcodeUseropSymbolMap

      public PcodeUseropSymbolMap(SleighLanguage language, Map<Integer, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byIndex)
      Construct a store from the language and symbols by index

      This constructor re-indexes by name as well to create the full store

      Parameters:
      language - the language whose symbols are incorporated into retrieval
      byIndex - the symbols by index, excluding those in the language already
    • PcodeUseropSymbolMap

      public PcodeUseropSymbolMap(SleighLanguage language, Map<Integer, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byIndex, Map<String, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byName)
      Creates an instance of a PcodeUseropSymbolMap record class.
      Parameters:
      language - the value for the language record component
      byIndex - the value for the byIndex record component
      byName - the value for the byName record component
  • Method Details

    • empty

    • getUseropName

      public String getUseropName(int index)
      Get the name of a userop by its index, whether from the language or library
      Parameters:
      index - the index
      Returns:
      the name, or null
    • getUseropIndex

      public int getUseropIndex(String name)
      Get the index of a userop by its name, whether from the language or library
      Parameters:
      name - the name
      Returns:
      the index, or -1
    • addToParser

      public void addToParser(PcodeParser parser)
      Add the library symbols to a given parser
      Parameters:
      parser - the parser whose table to populate
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • language

      public SleighLanguage language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • byIndex

      public Map<Integer, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byIndex()
      Returns the value of the byIndex record component.
      Returns:
      the value of the byIndex record component
    • byName

      public Map<String, ghidra.pcodeCPort.slghsymbol.UserOpSymbol> byName()
      Returns the value of the byName record component.
      Returns:
      the value of the byName record component