commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <>
Subject Re: StringUtils constructor is private
Date Mon, 12 Aug 2002 23:14:09 GMT
"Craig R. McClanahan" <> writes:

> On 12 Aug 2002, Daniel Rall wrote:
> > Velocity will invoke static methods on an instance, just as Java will.
> But Velocity apparently *requires* an instance in order to do this,
> whereas Java doesn't.

Actually, Java does require an instance to perform introspection
(which was Velocity's original and current default mode of operation).
Note that this differs from vanilla reflection, which is used under
the covers, but is not part of Velocity's "interface".

> Call it a restriction instead of a flaw if you want; it's a requirement
> imposed by Velocity on classes whose static methods it wants to access.

Yes.  JavaBean-style introspection doesn't work without an instance to
introspect.  IMHO, anyone who wants this Velocity behavior changed
should plug in their own uberspector/introspector combination.

Daniel Rall <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message