Class XpathFilterElement

  • All Implemented Interfaces:
    TreeWalkerFilter

    public class XpathFilterElement
    extends java.lang.Object
    implements TreeWalkerFilter
    This filter element is immutable and processes TreeWalkerAuditEvent objects based on the criteria of file, check, module id, xpathQuery.
    • Constructor Summary

      Constructors 
      Constructor Description
      XpathFilterElement​(java.lang.String files, java.lang.String checks, java.lang.String message, java.lang.String moduleId, java.lang.String query)
      Creates a XpathElement instance.
      XpathFilterElement​(java.util.regex.Pattern files, java.util.regex.Pattern checks, java.util.regex.Pattern message, java.lang.String moduleId, java.lang.String query)
      Creates a XpathElement instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(TreeWalkerAuditEvent event)
      Determines whether or not a filtered TreeWalkerAuditEvent is accepted.
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XpathFilterElement

        public XpathFilterElement​(java.lang.String files,
                                  java.lang.String checks,
                                  java.lang.String message,
                                  java.lang.String moduleId,
                                  java.lang.String query)
        Creates a XpathElement instance.
        Parameters:
        files - regular expression for names of filtered files
        checks - regular expression for filtered check classes
        message - regular expression for messages.
        moduleId - the module id
        query - the xpath query
      • XpathFilterElement

        public XpathFilterElement​(java.util.regex.Pattern files,
                                  java.util.regex.Pattern checks,
                                  java.util.regex.Pattern message,
                                  java.lang.String moduleId,
                                  java.lang.String query)
        Creates a XpathElement instance.
        Parameters:
        files - regular expression for names of filtered files
        checks - regular expression for filtered check classes
        message - regular expression for messages.
        moduleId - the module id
        query - the xpath query
    • Method Detail

      • accept

        public boolean accept​(TreeWalkerAuditEvent event)
        Description copied from interface: TreeWalkerFilter
        Determines whether or not a filtered TreeWalkerAuditEvent is accepted.
        Specified by:
        accept in interface TreeWalkerFilter
        Parameters:
        event - the TreeWalkerAuditEvent to filter.
        Returns:
        true if the event is accepted.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object