On Fri, 10 Nov 2000, John McNally wrote:
> But wouldn't it be easier and more flexible to support the dropping of
> empty () in general? Why does Velocity not allow this when it was
> something that could be done in WM?
I would like to stick to standard bean behavior for properties.
If there is no () on the end then it is expected to be a property
as per the bean spec. I didn't really look a whole lot at WM :-)
But we can certainly add it if people want it that way.
> I am thinking it is only a couple
> of lines of code in ASTIdentifier, am I wrong?
It would be easy enough to add, yes.
> Dropping the "is" would also be worthwhile, but then it also might be
> good to check the "has" prefix as well. I don't know if "has" in
> allowed in beans, but it is in wide use.
$gunslinger.TriggerFinger would not translate
into $gunslinger.hasTriggerFinger() as per the bean spec.
> > All results of introspection are cached after the first pass. Not
> > only for properties but for all methods as well. The results
> > of introspection are actually held in the AST itself in the
> > pertinent nodes.
>
> I guess I need to update my checkout, I was concentrating my
> investigation on ASTIdentifier, did I miss something or should I be
> looking elsewhere?
The ASTIdentifier.init() figures out whether it's dealing
with a property or a Map. There is an AbstractExecutor, and
MapExecutor and PropertyExecutor subclasses. The executor is
store for the subsequent renderings. The Introspector is not
used in the ASTIdentifer (maybe it should be), but the results
of determining whether it's a Map or Property are stored for
future use.
--
jvz.
Jason van Zyl
[EMAIL PROTECTED]