public abstract static class FormatterStep.Strict<State extends java.io.Serializable> extends LazyForwardingEquality<State> implements FormatterStep
Implements a FormatterStep in a strict way which guarantees correct and lazy implementation of up-to-date checks. This maximizes performance for cases where the FormatterStep is not actually needed (e.g. don’t load eclipse setting file unless this step is actually running) while also ensuring that gradle can detect changes in a step’s settings to determine that it needs to rerun a format.
FormatterStep.Strict<State extends java.io.Serializable>NoLambda.EqualityBasedOnSerialization| Constructor and Description |
|---|
Strict() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
format(State state,
java.lang.String rawUnix,
java.io.File file)
Implements the formatting function strictly in terms
of the input data and the result of
LazyForwardingEquality.calculateState(). |
java.lang.String |
format(java.lang.String rawUnix,
java.io.File file)
Returns a formatted version of the given content.
|
calculateState, equals, hashCode, state, toBytesclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreate, createLazy, createNeverUpToDate, createNeverUpToDateLazy, filterByFile, getNameprotected abstract java.lang.String format(State state, java.lang.String rawUnix, java.io.File file) throws java.lang.Throwable
Implements the formatting function strictly in terms
of the input data and the result of LazyForwardingEquality.calculateState().
java.lang.Throwablepublic final java.lang.String format(java.lang.String rawUnix,
java.io.File file)
throws java.lang.Throwable
FormatterStepReturns a formatted version of the given content.
format in interface FormatterSteprawUnix - the content to format, guaranteed to have unix-style newlines (‘\n’); never nullfile - the file which rawUnix was obtained from; never null. Pass an empty file using
new File("") if and only if no file is actually associated with rawUnixjava.lang.Exception - if the formatter step experiences a problemjava.lang.Throwable