I was wondering if there is a convenient way to restrict method calls on
objects I put into VelocityContext. I use Velocity templates to do
dynamic renders high-traffic websites, and I instantiate VelocityEngine
objects along with various POJOs that Spring assembles. These POJOs are
sort of
Serge Knystautas [EMAIL PROTECTED] wrote:
I was wondering if there is a convenient way to restrict method calls on
objects I put into VelocityContext. I use Velocity templates to do
dynamic renders high-traffic websites, and I instantiate VelocityEngine
objects along with various POJOs
Mike Kienenberger wrote:
Well, the easy answer to this part of the question is to implement a custom
Uberspect.
http://jakarta.apache.org/velocity/api/org/apache/velocity/util/introspection/Uberspect.html
There's examples of this on the wiki:
Serge Knystautas [EMAIL PROTECTED] wrote:
Mike Kienenberger wrote:
Well, the easy answer to this part of the question is to implement a
custom
Uberspect.
http://jakarta.apache.org/velocity/api/org/apache/velocity/util/introspection/Uberspect.html
There's examples of this on the
Velocity itself has a rule to accept all public methods. It is up to
the programmer to decide which methods to make available to Velocity
by making the methods public. Velocity, even JAVA, has no way of
knowing if a method will change the underlying class. Making a class
immutable is up to the