Class WarningSuppressor

    • Field Detail

      • USELESS_SUPPRESSION_ABB

        protected static final java.lang.String USELESS_SUPPRESSION_ABB
        See Also:
        Constant Field Values
      • DEBUG

        static final boolean DEBUG
      • bugPattern

        protected final java.lang.String bugPattern
      • alternateSuppressors

        private java.util.Set<WarningSuppressor> alternateSuppressors
    • Constructor Detail

      • WarningSuppressor

        protected WarningSuppressor​(java.lang.String bugPattern,
                                    SuppressMatchType matchType)
    • Method Detail

      • match

        public boolean match​(BugInstance bugInstance)
        Description copied from interface: Matcher
        Determine whether or not the given BugInstance has the feature this Matcher tests for.
        Specified by:
        match in interface Matcher
        Parameters:
        bugInstance - the BugInstance
        Returns:
        true if the BugInstance matches, false if not
      • isUselessSuppressionReportable

        public boolean isUselessSuppressionReportable()
        Returns:
        true if useless suppressions should be reported.
      • writeXML

        public void writeXML​(XMLOutput xmlOutput,
                             boolean disabled)
                      throws java.io.IOException
        Specified by:
        writeXML in interface Matcher
        Throws:
        java.io.IOException
      • addAlternateSuppressors

        public void addAlternateSuppressors​(java.util.Collection<WarningSuppressor> additionalSuppressors)
      • getAlternateSuppressors

        public java.util.Collection<WarningSuppressor> getAlternateSuppressors()
        Returns:
        The alternate suppressors that might have been generated from a single SuppressWarnings annotation. See NoteSuppressedWarnings
      • adjustBugPatternForMessage

        protected java.lang.String adjustBugPatternForMessage()