@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault
Package com.diffplug.spotless
-
Interface Summary Interface Description FormatExceptionPolicy A policy for handling exceptions in the format.FormatterFunc AFunction<String, String>
which can throw an exception.FormatterFunc.Closeable Function<String, String>
andBiFunction<String, File, String>
whose implementation requires a resource which should be released when the function is no longer needed.FormatterFunc.Closeable.ResourceFunc<T extends java.lang.AutoCloseable> FormatterFunc.Closeable.ResourceFuncNeedsFile<T extends java.lang.AutoCloseable> FormatterFunc.NeedsFile FormatterStep An implementation of this class specifies a single step in a formatting process.LineEnding.Policy A policy for line endings which can vary based on the specific file being requested.NoLambda Marker interface to prevent lambda implementations of single-method interfaces that require serializability.Provisioner Many spotless steps require third-party libraries, but we want to keep Spotless' dependencies minimal.SerializableFileFilter A file filter with full support for serialization.SerializedFunction<T,R> ThrowingEx.BiFunction<T1,T2,R> A bi-function that can throw any exception.ThrowingEx.Function<T,R> A function that can throw any exception.ThrowingEx.Runnable A runnable that can throw any exception.ThrowingEx.Supplier<T> A supplier that can throw any exception. -
Class Summary Class Description ConfigurationCacheHackList Gradle requires three things: - Gradle defines cache equality based on your serialized representation - Combined with remote build cache, you cannot have any absolute paths in your serialized representation - Combined with configuration cache, you must be able to roundtrip yourself through serialization These requirements are at odds with each other, as described in these issues - Gradle issue to define custom equality https://github.com/gradle/gradle/issues/29816 - Spotless plea for developer cache instead of configuration cache https://github.com/diffplug/spotless/issues/987 - Spotless cache miss bug fixed by this class https://github.com/diffplug/spotless/issues/2168 This class is a `List` which can optimize the serialized representation for either - roundtrip integrity - OR - equality Because it is not possible to provide both at the same time. FileSignature Computes a signature for any needed files.FileSignature.Promised A view of `FileSignature` which can be safely roundtripped.ForeignExe Finds a foreign executable and checks its version.FormatExceptionPolicyStrict A policy for handling exceptions in the format.Formatter Formatter which performs the full formatting.Formatter.Builder FormatterProperties Utility manages settings of formatter configured by properties.JarState Grabs a jar and its dependencies from maven, and makes it easy to access the collection in a classloader.JarState.Promised A lazily evaluated JarState, which becomes a set of files when serialized.Jvm Java virtual machine helperJvm.Support<V> Utility to map constraints of formatter to this JVMLazyArgLogger This is a utility class to allow for lazy evaluation of arguments to be passed to a logger and thus avoid unnecessary computation of the arguments if the log level is not enabled.LazyForwardingEquality<T extends java.io.Serializable> Implements equality, hashcode, and serialization entirely in terms of lazily-computed state.NoLambda.EqualityBasedOnSerialization An implementation of NoLambda in which equality is based on the serialized representation of itself.PaddedCell Models the result of applying aFormatter
on a givenFile
while characterizing various failure modes (slow convergence, cycles, and divergence).PaddedCell.DirtyState The clean/dirty state of a single file.ProcessRunner Shelling out to a process is harder than it ought to be in Java.ProcessRunner.Result SerializedFunction.AlwaysReturns<T,R> SpotlessCache Spotless' global cache.ThrowingEx Basic functional interfaces which throw exception, along with static helper methods for calling them. -
Enum Summary Enum Description LineEnding Represents the line endings which should be written by the tool.OnMatch Enum to make boolean logic more readable.PaddedCell.Type The kind of result. -
Exception Summary Exception Description ThrowingEx.WrappedAsRuntimeException A RuntimeException specifically for the purpose of wrapping non-runtime Exceptions as RuntimeExceptions.