Interface QualifierFilter

All Known Implementing Classes:
AndFilter, DatatypeMatchFilter, PositionMatchFilter, VarargsFilter

public interface QualifierFilter
A filter on some aspect of a specific function prototype. An instance is configured via the restoreXml() method, then a test of whether a function prototype meets its criteria can be performed by calling its filter() method.
  • Method Details

    • clone

      Make a copy of this qualifier
      Returns:
      the copy
    • isEquivalent

      boolean isEquivalent(QualifierFilter op)
      Test if the given filter is configured and performs identically to this
      Parameters:
      op - is the given filter
      Returns:
      true if the two filters are equivalent
    • filter

      boolean filter(PrototypePieces proto, int pos)
      Test whether the given function prototype meets this filter's criteria
      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

      void encode(Encoder encoder) throws IOException
      Save this filter and its configuration to a stream
      Parameters:
      encoder - is the stream encoder
      Throws:
      IOException - for problems writing to the stream
    • restoreXml

      void restoreXml(XmlPullParser parser) throws XmlParseException
      Configure details of the criteria being filtered from the given stream
      Parameters:
      parser - is the given stream decoder
      Throws:
      XmlParseException - if there are problems with the stream
    • restoreFilterXml

      static QualifierFilter restoreFilterXml(XmlPullParser parser) throws XmlParseException
      Instantiate a qualifier from the stream. If the next element is not a qualifier, return null.
      Parameters:
      parser - is the given stream decoder
      Returns:
      the new qualifier instance or null
      Throws:
      XmlParseException - for problems decoding the stream