org.eclipse.jet.core.parser
Interface ITemplateResolver
-
All Known Implementing Classes:
-
AbstractTemplateResolver,
DefaultTemplateResolver
-
public interface ITemplateResolver
Protocol for resolving JET template paths into actual input - used by the JET parser and compiler.
Method Summary
|
java.net.URI[]
|
getBaseLocations
()
Return the base locations from which the template resolver will load templates |
ITemplateInput
|
getIncludedInput
(java.lang.String templatePath,
ITemplateInput[] activeInputs)
Return the appropriate template input, given a template path, and the current stack of
template inputs. |
ITemplateInput
|
getInput
(java.lang.String templatePath)
Return the template input given a template path. |
getInput
ITemplateInput getInput(java.lang.String templatePath)
- Return the template input given a template path.
-
-
Parameters:
-
templatePath
- the JET template path
-
Returns:
- the template input, or
null
getIncludedInput
ITemplateInput getIncludedInput(java.lang.String templatePath,
ITemplateInput[] activeInputs)
throws
RecursiveIncludeException
- Return the appropriate template input, given a template path, and the current stack of
template inputs.
The activeInputs argument is order from initial input to most recently included input.
-
-
Parameters:
-
templatePath
- the JET template path -
activeInputs
- the input stack.
-
Returns:
- the template input, or
null
-
Throws:
-
RecursiveIncludeException
- if including templatePath would result in a recursive loop
-
java.lang.NullPointerException
- if either argument is null
-
java.lang.IllegalArgumentException
- if inputStack
does not contain at least one element.
getBaseLocations
java.net.URI[] getBaseLocations()
- Return the base locations from which the template resolver will load templates
-
-
Returns:
- a non-empty array of base location URIs.