public abstract class AbstractSingleIncludeSourceProvider extends AbstractSourceProvider
The implementations should not override the methods get()
but should
implement the abstract methods getSource()
. The method
getSource()
is invoked only when it is ensured that the source was
not yet included.
Constructor and Description |
---|
AbstractSingleIncludeSourceProvider() |
Modifier and Type | Method and Description |
---|---|
Reader |
get(String sourceName)
Get a reader to a source when there is no referencing source.
|
Reader |
get(String sourceName,
String referencingSource)
Get a reader to a source specifying the source that references this
source.
|
protected abstract String |
getKeyName(String sourceName) |
protected abstract String |
getKeyName(String sourceName,
String referencingSource) |
SingleIncludeChecker |
getSingleInclude() |
protected abstract Reader |
getSource(String sourceName) |
protected abstract Reader |
getSource(String sourceName,
String referencingSource) |
void |
setSingleInclude(SingleIncludeChecker singleInclude) |
public SingleIncludeChecker getSingleInclude()
public void setSingleInclude(SingleIncludeChecker singleInclude)
public final Reader get(String sourceName) throws IOException
SourceProvider
get
in interface SourceProvider
get
in class AbstractSourceProvider
sourceName
- the name of the sourceIOException
public final Reader get(String sourceName, String referencingSource) throws IOException
SourceProvider
get
in interface SourceProvider
get
in class AbstractSourceProvider
sourceName
- the name of the source to get the reader to.referencingSource
- the name of the source that is referencing the source to read.IOException
protected abstract Reader getSource(String sourceName) throws IOException
IOException
protected abstract Reader getSource(String sourceName, String referencingSource) throws IOException
IOException
Copyright © 2013 Verhas and Verhas Software Craftsmen. All Rights Reserved.