Class ByteBuddyMojo.StalenessFilter

All Implemented Interfaces:
ElementMatcher<Plugin.Engine.Source.Element>, ElementMatcher.Junction<Plugin.Engine.Source.Element>
Enclosing class:
ByteBuddyMojo

protected static class ByteBuddyMojo.StalenessFilter extends ElementMatcher.Junction.ForNonNullValues<Plugin.Engine.Source.Element>
A filter for files that were written before a given timestamp, to avoid duplicate application.
  • Field Details

    • log

      private final org.apache.maven.plugin.logging.Log log
      The logger to use.
    • latestTimestamp

      private final long latestTimestamp
      The timestamp for files to be filtered if they were created before it.
    • filtered

      private int filtered
      A count of class files that were filtered.
  • Constructor Details

    • StalenessFilter

      protected StalenessFilter(org.apache.maven.plugin.logging.Log log, long latestTimestamp)
      Creates a new staleness filter.
      Parameters:
      log - The logger to use.
      latestTimestamp - The timestamp for files to be filtered if they were created before it.
  • Method Details

    • doMatch

      protected boolean doMatch(Plugin.Engine.Source.Element target)
      Matches the supplied value if it was found not to be null.
      Specified by:
      doMatch in class ElementMatcher.Junction.ForNonNullValues<Plugin.Engine.Source.Element>
      Parameters:
      target - The instance to be matched.
      Returns:
      true if the given element is matched by this matcher or false otherwise.
    • getFiltered

      protected int getFiltered()
      Returns a count of class files that were filtered as they were created prior to the last build.
      Returns:
      The amount of filtered classes.