freemarker.template.expression
Class ExpressionCache

java.lang.Object
  extended by freemarker.template.expression.ExpressionCache

public final class ExpressionCache
extends java.lang.Object

A simple expression cache. All keys and values are stored as WeakReference objects, allowing cached items to be freed in low-memory situations.

Version:
$Id: ExpressionCache.java 1101 2013-04-01 04:17:32Z run2000 $

Method Summary
static Expression cacheExpression(Expression expr)
          Resolves the current expression, possibly into a different expression object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cacheExpression

public static Expression cacheExpression(Expression expr)
Resolves the current expression, possibly into a different expression object. This is loosely equivalent to the serialization protocol's readResolve method. Situations where this may be used are: