public class DefaultIncluder extends java.lang.Object implements TAMEScriptIncluder
classpath:
are parsed as resource paths in the current classpath.Constructor and Description |
---|
DefaultIncluder() |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getIncludeResource(java.lang.String path)
Returns an open
InputStream for a path when the parser needs a resource. |
java.lang.String |
getIncludeResourcePath(java.lang.String streamName,
java.lang.String path)
Returns a full path for a path when the parser needs a resource.
|
public java.lang.String getIncludeResourcePath(java.lang.String streamName, java.lang.String path) throws java.io.IOException
com.tameif.tame.struct.PreprocessorLexer.Includer
getIncludeResourcePath
in interface com.tameif.tame.struct.PreprocessorLexer.Includer
streamName
- the current name of the stream. This includer may use this to
procure a relative path.path
- the stream path from the include directive.java.io.IOException
- if an error occurs procuring a potential stream.public java.io.InputStream getIncludeResource(java.lang.String path) throws java.io.IOException
com.tameif.tame.struct.PreprocessorLexer.Includer
InputStream
for a path when the parser needs a resource.
By default, this attempts to open a file at the provided path.getIncludeResource
in interface com.tameif.tame.struct.PreprocessorLexer.Includer
path
- the resolved stream path from the include directive.InputStream
for the requested resource, or null if not found.java.io.IOException
- if an error occurs opening a stream.