cwong15 / freemarker-introspection

Classes to allow introspection of a Freemarker template
Apache License 2.0
3 stars 1 forks source link

freemarker-introspection

This project provides Freemarker template introspection capability. It exposes a parsed AST structure for programmatic inspection.

This project is basically in a very rough proof-of-concept state. All code here is for illustrative purposes only and cannot be relied on to be stable.

The starting point is the TemplateIntrospector class, which creates the introspection tree. With the root node of the tree in hand, you can then navigate the tree to discover its structure. You can either directly navigate each node's children and param properties or use the visitor pattern.

This project provides 2 consumers of this introspection tree:

Building quick start:

You must have Gradle installed to build this project.

To build the library: "gradle jar"

To build the Javadoc of the public interfaces: "gradle javadoc"

To generate the Eclipse project: "gradle eclipse"