Class VarargsFilter

java.lang.Object
ghidra.program.model.lang.protorules.VarargsFilter
All Implemented Interfaces:
QualifierFilter

public class VarargsFilter extends Object implements QualifierFilter
A filter that selects function parameters that are considered optional. If the underlying function prototype is considered to take variable arguments, the first n parameters (as determined by PrototypePieces.firstVarArgSlot) are considered non-optional. If additional data-types are provided beyond the initial n, these are considered optional. This filter returns true for these optional parameters
  • Constructor Details

    • VarargsFilter

      public VarargsFilter()
  • Method Details

    • clone

      public QualifierFilter clone()
      Description copied from interface: QualifierFilter
      Make a copy of this qualifier
      Specified by:
      clone in interface QualifierFilter
      Overrides:
      clone in class Object
      Returns:
      the copy
    • isEquivalent

      public boolean isEquivalent(QualifierFilter op)
      Description copied from interface: QualifierFilter
      Test if the given filter is configured and performs identically to this
      Specified by:
      isEquivalent in interface QualifierFilter
      Parameters:
      op - is the given filter
      Returns:
      true if the two filters are equivalent
    • filter

      public boolean filter(PrototypePieces proto, int pos)
      Description copied from interface: QualifierFilter
      Test whether the given function prototype meets this filter's criteria
      Specified by:
      filter in interface QualifierFilter
      Parameters:
      proto - is the high-level description of the function prototype to test
      pos - is the position of a specific output (pos=-1) or input (pos >=0) in context
      Returns:
      true if the prototype meets the criteria, false otherwise
    • encode

      public void encode(Encoder encoder) throws IOException
      Description copied from interface: QualifierFilter
      Save this filter and its configuration to a stream
      Specified by:
      encode in interface QualifierFilter
      Parameters:
      encoder - is the stream encoder
      Throws:
      IOException - for problems writing to the stream
    • restoreXml

      public void restoreXml(XmlPullParser parser) throws XmlParseException
      Description copied from interface: QualifierFilter
      Configure details of the criteria being filtered from the given stream
      Specified by:
      restoreXml in interface QualifierFilter
      Parameters:
      parser - is the given stream decoder
      Throws:
      XmlParseException - if there are problems with the stream