X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FParser.java;h=ea3a81c3a2faf8e7d241ee5886e5f43c8792ef09;hb=7da4d587d416bc474a25b08f56aaab7c82dc8351;hp=87cdab5fc290d9196ee5f2358dbaf99db9dd0950;hpb=0df5e91852f737d760c5a9f54c5667309fbadcc2;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/text/Parser.java b/src/main/java/net/pterodactylus/sone/text/Parser.java index 87cdab5..ea3a81c 100644 --- a/src/main/java/net/pterodactylus/sone/text/Parser.java +++ b/src/main/java/net/pterodactylus/sone/text/Parser.java @@ -1,5 +1,5 @@ /* - * Sone - Parser.java - Copyright © 2010 David Roden + * Sone - Parser.java - Copyright © 2010–2015 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,8 +17,9 @@ package net.pterodactylus.sone.text; -import java.io.IOException; import java.io.Reader; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; /** * Interface for parsers that can create {@link Part}s from a text source @@ -33,14 +34,13 @@ public interface Parser { /** * Create one or more {@link Part}s from the given text source. * - * @param context - * The parser context (may be {@code null}) * @param source * The text source + * @param context + * The parser context (may be {@code null}) * @return The parsed parts - * @throws IOException - * if an I/O error occurs */ - public Iterable parse(C context, Reader source) throws IOException; + @Nonnull + Iterable parse(@Nonnull String source, @Nullable C context); }