Class NotExecutableCategoryBSimFilterType

java.lang.Object
ghidra.features.bsim.gui.filters.BSimFilterType
ghidra.features.bsim.gui.filters.NotExecutableCategoryBSimFilterType
All Implemented Interfaces:
Comparable<BSimFilterType>

public class NotExecutableCategoryBSimFilterType extends BSimFilterType
A BsimFilterType for filtering functions based on not matching specific category values.
  • Field Details

  • Constructor Details

    • NotExecutableCategoryBSimFilterType

      public NotExecutableCategoryBSimFilterType(String sub)
  • Method Details

    • saveXml

      public void saveXml(Writer fwrite) throws IOException
      Description copied from class: BSimFilterType
      Save XML attributes corresponding to this template
      Overrides:
      saveXml in class BSimFilterType
      Parameters:
      fwrite - is the output stream
      Throws:
      IOException - for problems writing to the stream
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BSimFilterType
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class BSimFilterType
    • gatherSQLEffect

      public void gatherSQLEffect(SQLEffects effect, FilterAtom atom, IDSQLResolution resolution) throws SQLException
      Custom category filters are processed after results are received, as a necessary consequence of the database structure. So we allow the query to return all possible results, and cull them after the fact.
      Specified by:
      gatherSQLEffect in class BSimFilterType
      Parameters:
      effect - is SQLEffects container for this filter elements pieces and others
      atom - holds the values for a particular instantiation of this filter element
      resolution - is the IDResolution containing relevant row ids for the filter, which must have been precalculated
      Throws:
      SQLException - for errors building the SQL clause
      See Also:
    • gatherElasticEffect

      public void gatherElasticEffect(ElasticEffects effect, FilterAtom atom, IDElasticResolution resolution) throws ElasticException
      Description copied from class: BSimFilterType
      Gather pieces necessary to emit this filter as part of an elasticsearch query document
      Specified by:
      gatherElasticEffect in class BSimFilterType
      Parameters:
      effect - is the ElasticEffects container holding the pieces
      atom - holds the values for a particular instantiation of this filter element
      resolution - contains relevant ids for the filter, which must have been precalculated
      Throws:
      ElasticException - for errors building the JSON subdocument
    • buildSQLCombinedClause

      public String buildSQLCombinedClause(List<String> subClauses)
      Description copied from class: BSimFilterType
      Given (multiple) clauses for a single filter type, combine into a single SQL where clause
      Overrides:
      buildSQLCombinedClause in class BSimFilterType
      Parameters:
      subClauses - is the list of SQL clauses
      Returns:
      the combined clause
    • evaluate

      public boolean evaluate(ExecutableRecord rec, String value)
      Description copied from class: BSimFilterType
      Evaluate this filter for a specific ExecutableRecord and a specific filter -value-
      Specified by:
      evaluate in class BSimFilterType
      Parameters:
      rec - is the ExecutableRecord to filter against
      value - is the String value for an instantiated filter
      Returns:
      true if this element would allow the ExecutableRecord to pass the filter
    • generateIDSQLResolution

      public IDSQLResolution generateIDSQLResolution(FilterAtom atom)
      Description copied from class: BSimFilterType
      Construct a record describing the column id's that might need to be recovered before this filter element can be converted to an SQL clause
      Specified by:
      generateIDSQLResolution in class BSimFilterType
      Parameters:
      atom - is the specific FilterAtom to generate the record for
      Returns:
      the IDSQLResolution record or null if no ids need to be recovered
    • orMultipleEntries

      public boolean orMultipleEntries()
      Overrides:
      orMultipleEntries in class BSimFilterType
      Returns:
      true if multiple filters of this type should be OR'd. AND them otherwise.