Class SnippetReader
java.lang.Object
org.apache.maven.doxia.macro.snippet.SnippetReader
Utility class for reading snippets.
-
Constructor Summary
ConstructorsConstructorDescriptionSnippetReader(URL src) Constructor.SnippetReader(URL src, String encoding) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanisDemarcator(String snippetId, String what, String line) Determines if the given line is a demarcator.protected booleanDetermines if the given line is an end demarcator.protected booleanDetermines if the given line is a start demarcator.readSnippet(String snippetId) Reads the snippet with given id.
-
Constructor Details
-
SnippetReader
Constructor.- Parameters:
src- The sourceencoding- The file encoding
-
SnippetReader
Constructor.- Parameters:
src- The source
-
-
Method Details
-
readSnippet
Reads the snippet with given id.- Parameters:
snippetId- The id of the snippet.- Returns:
- The snippet.
- Throws:
IOException- if something goes wrong.
-
isStart
Determines if the given line is a start demarcator.- Parameters:
snippetId- the id of the snippet.line- the line.- Returns:
- True, if the line is a start demarcator.
-
isDemarcator
Determines if the given line is a demarcator.- Parameters:
snippetId- the id of the snippet.what- Identifier for the demarcator.line- the line.- Returns:
- True, if the line is a start demarcator.
-
isEnd
Determines if the given line is an end demarcator.- Parameters:
snippetId- the id of the snippet.line- the line.- Returns:
- True, if the line is an end demarcator.
-