Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

That doesn't mean that the user object might not be resolvable the next time this expression is invoked though, so the next time the compiler tries it may succeed in which case the whole expression is enhanced and the new ExpressionAccessor instance is attached to the root Node object by calling SimpleNode.setAccessor(newInstance).

The fail safe logic is there for expressions that are likely to never be resolvable for one reason or another. In these instances a ExpressionAccessor class instance is still created - with the major difference being that instead of pure java object expressions being compiled the get/set methods on the instance just call back to the standard OGNL getValue/setValue methods:

No Format

public Object get(OgnlContext context, Object root)
{
  return _node.getValue($1, $2);
}

The $1, $2 references are Javassist constructs which allow you to specify the first and second argument passed in to the calling method.