MCPcopy Create free account
hub / github.com/apache/freemarker / process

Method process

src/main/java/freemarker/core/Environment.java:191–211  ·  view source on GitHub ↗

Processes the template to which this environment belongs.

()

Source from the content-addressed store, hash-verified

189 * Processes the template to which this environment belongs.
190 */
191 public void process() throws TemplateException, IOException {
192 Object savedEnv = threadEnv.get();
193 threadEnv.set(this);
194 try {
195 // Cached values from a previous execution are possibly outdated.
196 clearCachedValues();
197 try {
198 doAutoImportsAndIncludes(this);
199 visit(getTemplate().getRootTreeNode());
200 // It's here as we must not flush if there was an exception.
201 if (getAutoFlush()) {
202 out.flush();
203 }
204 } finally {
205 // It's just to allow the GC to free memory...
206 clearCachedValues();
207 }
208 } finally {
209 threadEnv.set(savedEnv);
210 }
211 }
212
213 /**
214 * "Visit" the template element.

Callers 1

processMethod · 0.95

Calls 9

clearCachedValuesMethod · 0.95
visitMethod · 0.95
getTemplateMethod · 0.95
setMethod · 0.80
getRootTreeNodeMethod · 0.80
getAutoFlushMethod · 0.80
getMethod · 0.65
flushMethod · 0.45

Tested by

no test coverage detected