projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing imports.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
text
/
Parser.java
diff --git
a/src/main/java/net/pterodactylus/sone/text/Parser.java
b/src/main/java/net/pterodactylus/sone/text/Parser.java
index
ccec36a
..
e43ed47
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/text/Parser.java
+++ b/
src/main/java/net/pterodactylus/sone/text/Parser.java
@@
-24,19
+24,23
@@
import java.io.Reader;
* Interface for parsers that can create {@link Part}s from a text source
* (usually a {@link Reader}).
*
* Interface for parsers that can create {@link Part}s from a text source
* (usually a {@link Reader}).
*
+ * @param <C>
+ * The type of the parser context
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
-public interface Parser {
+public interface Parser
<C extends ParserContext>
{
/**
* Create a {@link Part} from the given text source.
*
/**
* Create a {@link Part} from the given text source.
*
+ * @param context
+ * The parser context
* @param source
* The text source
* @return The parsed part
* @throws IOException
* if an I/O error occurs
*/
* @param source
* The text source
* @return The parsed part
* @throws IOException
* if an I/O error occurs
*/
- public Part parse(Reader source) throws IOException;
+ public Part parse(
C context,
Reader source) throws IOException;
}
}