Skip to content

Commit d893a3d

Browse files
committed
Make CompletingParsedLine an inner class in ExtendedDefaultParser
This interface is not used outside ExtendedDefaultParser
1 parent 78763c1 commit d893a3d

File tree

2 files changed

+16
-35
lines changed

2 files changed

+16
-35
lines changed

spring-shell-jline/src/main/java/org/springframework/shell/jline/CompletingParsedLine.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

spring-shell-jline/src/main/java/org/springframework/shell/jline/ExtendedDefaultParser.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -378,4 +378,19 @@ public int rawWordLength() {
378378
}
379379
}
380380

381+
/**
382+
* An extension of {@link ParsedLine} that, being aware of the quoting and escaping
383+
* rules of the {@link Parser} that produced it, knows if and how a completion
384+
* candidate should be escaped/quoted.
385+
*
386+
* @author Eric Bottard
387+
* @author Piotr Olaszewski
388+
*/
389+
@FunctionalInterface
390+
interface CompletingParsedLine {
391+
392+
CharSequence emit(CharSequence candidate);
393+
394+
}
395+
381396
}

0 commit comments

Comments
 (0)