Class ResourceCodeResolver
java.lang.Object
gg.jte.resolve.ResourceCodeResolver
- All Implemented Interfaces:
CodeResolver
Resolves template code within a given resources root.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResourceCodeResolver(String root) ResourceCodeResolver(String root, ClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a template with this name exists.private ClassLoaderlonggetLastModified(String name) Resolves the last modification time of a template.Resolves the code of a template.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CodeResolver
resolveAllTemplateNames, resolveRequired
-
Field Details
-
root
-
classLoader
-
-
Constructor Details
-
ResourceCodeResolver
-
ResourceCodeResolver
-
-
Method Details
-
resolve
Description copied from interface:CodeResolverResolves the code of a template.- Specified by:
resolvein interfaceCodeResolver- Parameters:
name- The name of the template, e.g."tag/util/card.jte".- Returns:
- The code of the resolved template, or
nullif no template with this name exists.
-
exists
Description copied from interface:CodeResolverChecks if a template with this name exists.- Specified by:
existsin interfaceCodeResolver- Parameters:
name- The name of the template, e.g."tag/util/card.jte".- Returns:
trueif a template with this name exists, otherwise false.
-
getLastModified
Description copied from interface:CodeResolverResolves the last modification time of a template.- Specified by:
getLastModifiedin interfaceCodeResolver- Parameters:
name- The name of the template, e.g."tag/util/card.jte".- Returns:
- The last modification time of this template in milliseconds, or
0Lif no template with this name exists. In case thisCodeResolverdoes not support modification times0Lshould be returned.
-
getClassLoader
-