Class SearchType

java.lang.Object
ghidra.features.base.replace.SearchType
All Implemented Interfaces:
Comparable<SearchType>

public class SearchType extends Object implements Comparable<SearchType>
Represents a ghidra program element type that can be individually included or excluded when doing a search and replace operation. The SearchAndReplaceDialog will include a checkbox for each of these types.
  • Constructor Details

    • SearchType

      public SearchType(SearchAndReplaceHandler handler, String name, String description)
      Constructor
      Parameters:
      handler - The SearchAndReplaceHandler that actually has the logic for doing the search for this program element type.
      name - the name of element type that is searchable
      description - a description of this type which would be suitable to display as a tooltip
  • Method Details

    • getHandler

      public SearchAndReplaceHandler getHandler()
      Returns the SearchAndReplaceHandler that can process this type.
      Returns:
      the handler for processing this type
    • getName

      public String getName()
      Returns the name of this search type.
      Returns:
      the name of this search type
    • getDescription

      public String getDescription()
      Returns a description of this search type.
      Returns:
      a description of this search type
    • getSearchTypes

      public static Set<SearchType> getSearchTypes()
      Static convenience method for finding all known SearchTypes. It uses the ClassSearcher to find all SearchAndReplaceHandlers and then gathers up all the SearchTypes that each handler supports.
      Returns:
      The set of all Known SearchTypes
    • compareTo

      public int compareTo(SearchType o)
      Specified by:
      compareTo in interface Comparable<SearchType>