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 wiki:
> > 
> > http://wiki.apache.org/jakarta-velocity/MultiUberspect
> > http://wiki.apache.org/jakarta-velocity/LuceneDocumentUberspect

> I was looking to extend VelocityContext to add a putImmutable(key, 
> object) method.  This would create an AOP-style proxy object that will 
> fail on any set method but otherwise just hand calls to the underlying 
> POJO.  Probably something CGLIB could do for me.

Yeah, that's something you could do with an Uberspect.
Set up something so you can do Uberspect.putImmutable(context, key, object) 
which will add it to the context, and add it to a list of objects to which 
you disallow set method calls.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to