Skip to content

Commit 005113e

Browse files
committed
Remove unneeded public declarations.
1 parent 5a05beb commit 005113e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lib/src/main/java/com/diffplug/spotless/FormatterStep.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
public interface FormatterStep extends Serializable {
3131
/** The name of the step, for debugging purposes. */
32-
public String getName();
32+
String getName();
3333

3434
/**
3535
* Returns a formatted version of the given content.
@@ -43,7 +43,8 @@ public interface FormatterStep extends Serializable {
4343
* if the formatter step doesn't have any changes to make
4444
* @throws Exception if the formatter step experiences a problem
4545
*/
46-
public @Nullable String format(String rawUnix, File file) throws Exception;
46+
@Nullable
47+
String format(String rawUnix, File file) throws Exception;
4748

4849
/**
4950
* Returns a new FormatterStep which will only apply its changes
@@ -54,7 +55,7 @@ public interface FormatterStep extends Serializable {
5455
* @return FormatterStep
5556
*/
5657
@Deprecated
57-
public default FormatterStep filterByContentPattern(String contentPattern) {
58+
default FormatterStep filterByContentPattern(String contentPattern) {
5859
return filterByContent(OnMatch.INCLUDE, contentPattern);
5960
}
6061

@@ -68,7 +69,7 @@ public default FormatterStep filterByContentPattern(String contentPattern) {
6869
* java regular expression used to filter in or out files which content contain pattern
6970
* @return FormatterStep
7071
*/
71-
public default FormatterStep filterByContent(OnMatch onMatch, String contentPattern) {
72+
default FormatterStep filterByContent(OnMatch onMatch, String contentPattern) {
7273
return new FilterByContentPatternFormatterStep(this, onMatch, contentPattern);
7374
}
7475

@@ -78,7 +79,7 @@ public default FormatterStep filterByContent(OnMatch onMatch, String contentPatt
7879
* <p>
7980
* The provided filter must be serializable.
8081
*/
81-
public default FormatterStep filterByFile(SerializableFileFilter filter) {
82+
default FormatterStep filterByFile(SerializableFileFilter filter) {
8283
return new FilterByFileFormatterStep(this, filter);
8384
}
8485

@@ -124,7 +125,7 @@ static <RoundtripState extends Serializable, EqualityState extends Serializable>
124125
ThrowingEx.Supplier<RoundtripState> roundtripInit,
125126
SerializedFunction<RoundtripState, EqualityState> equalityFunc,
126127
SerializedFunction<EqualityState, FormatterFunc> formatterFunc) {
127-
return new FormatterStepSerializationRoundtrip(name, roundtripInit, equalityFunc, formatterFunc);
128+
return new FormatterStepSerializationRoundtrip<>(name, roundtripInit, equalityFunc, formatterFunc);
128129
}
129130

130131
/**
@@ -160,7 +161,7 @@ static <RoundtripState extends Serializable, EqualityState extends Serializable>
160161
* only the state supplied by state and nowhere else.
161162
* @return A FormatterStep
162163
*/
163-
public static <State extends Serializable> FormatterStep createLazy(
164+
static <State extends Serializable> FormatterStep createLazy(
164165
String name,
165166
ThrowingEx.Supplier<State> stateSupplier,
166167
ThrowingEx.Function<State, FormatterFunc> stateToFormatter) {
@@ -177,7 +178,7 @@ public static <State extends Serializable> FormatterStep createLazy(
177178
* only the state supplied by state and nowhere else.
178179
* @return A FormatterStep
179180
*/
180-
public static <State extends Serializable> FormatterStep create(
181+
static <State extends Serializable> FormatterStep create(
181182
String name,
182183
State state,
183184
ThrowingEx.Function<State, FormatterFunc> stateToFormatter) {
@@ -194,7 +195,7 @@ public static <State extends Serializable> FormatterStep create(
194195
* @return A FormatterStep which will never report that it is up-to-date, because
195196
* it is not equal to the serialized representation of itself.
196197
*/
197-
public static FormatterStep createNeverUpToDateLazy(
198+
static FormatterStep createNeverUpToDateLazy(
198199
String name,
199200
ThrowingEx.Supplier<FormatterFunc> functionSupplier) {
200201
return new FormatterStepImpl.NeverUpToDate(name, functionSupplier);
@@ -208,7 +209,7 @@ public static FormatterStep createNeverUpToDateLazy(
208209
* @return A FormatterStep which will never report that it is up-to-date, because
209210
* it is not equal to the serialized representation of itself.
210211
*/
211-
public static FormatterStep createNeverUpToDate(
212+
static FormatterStep createNeverUpToDate(
212213
String name,
213214
FormatterFunc function) {
214215
Objects.requireNonNull(function, "function");

0 commit comments

Comments
 (0)