Class ComposedPcodeUseropLibrary<T>

java.lang.Object
ghidra.pcode.exec.ComposedPcodeUseropLibrary<T>
Type Parameters:
T - the type of values processed by the library
All Implemented Interfaces:
PcodeUseropLibrary<T>

public class ComposedPcodeUseropLibrary<T> extends Object implements PcodeUseropLibrary<T>
A p-code userop library composed of other libraries
  • Constructor Details

    • ComposedPcodeUseropLibrary

      public ComposedPcodeUseropLibrary(Collection<PcodeUseropLibrary<T>> libraries, boolean override)
      Construct a composed userop library from the given libraries

      This uses composeUserops(Collection, boolean), so its restrictions apply here, too.

      Parameters:
      libraries - the libraries
      override - allow libraries to the right to override userops from libraries to the left
  • Method Details

    • composeUserops

      public static <T> Map<String,PcodeUseropLibrary.PcodeUseropDefinition<T>> composeUserops(Collection<PcodeUseropLibrary<T>> libraries, boolean override)
      Obtain a map representing the composition of userops from all the given libraries

      Name collisions are not allowed. If any two libraries export the same symbol, even if the definitions happen to do the same thing, it is an error.

      Type Parameters:
      T - the type of values processed by the libraries
      Parameters:
      libraries - the libraries whose userops to collect
      override - allow libraries to the right to override userops from libraries to the left
      Returns:
      the resulting map
    • getUserops

      Description copied from interface: PcodeUseropLibrary
      Get all the userops defined in this library, keyed by (symbol) name.
      Specified by:
      getUserops in interface PcodeUseropLibrary<T>
      Returns:
      the map of names to defined userops