Package net.bytebuddy.build.maven
Class ByteBuddyMojo.StalenessFilter
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<Plugin.Engine.Source.Element>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<Plugin.Engine.Source.Element>
net.bytebuddy.build.maven.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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>, ElementMatcher.Junction.ForNonNullValues<W>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
A count of class files that were filtered.private final long
The timestamp for files to be filtered if they were created before it.private final org.apache.maven.plugin.logging.Log
The logger to use. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StalenessFilter
(org.apache.maven.plugin.logging.Log log, long latestTimestamp) Creates a new staleness filter. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doMatch
(Plugin.Engine.Source.Element target) Matches the supplied value if it was found not to benull
.protected int
Returns a count of class files that were filtered as they were created prior to the last build.Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues
matches
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
Field Details
-
log
private final org.apache.maven.plugin.logging.Log logThe logger to use. -
latestTimestamp
private final long latestTimestampThe timestamp for files to be filtered if they were created before it. -
filtered
private int filteredA 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
Matches the supplied value if it was found not to benull
.- Specified by:
doMatch
in classElementMatcher.Junction.ForNonNullValues<Plugin.Engine.Source.Element>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
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.
-