Add middleware pseudo-ids for default ordering

This commit is contained in:
2024-06-09 22:32:22 +02:00
parent df3a42a876
commit d785389fee

View File

@@ -4,13 +4,16 @@ import java.util.Collections;
import java.util.Set; import java.util.Set;
public interface Middleware<M> { public interface Middleware<M> {
String DEFAULT_START = "$default.start";
String DEFAULT_END = "$default.end";
String id(); String id();
default Set<String> mustComeBefore() { default Set<String> mustComeBefore() {
return Collections.emptySet(); return Collections.singleton(DEFAULT_END);
} }
default Set<String> mustComeAfter() { default Set<String> mustComeAfter() {
return Collections.emptySet(); return Collections.singleton(DEFAULT_START);
} }
M process(M inner); M process(M inner);