commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [JEXL] Access to static methods?
Date Mon, 12 May 2008 11:35:40 GMT
I see, thanks, very useful.

Presumably Jexl has to be given class objects for any static methods
it needs to call?
Or are there any objects which are built-in to Jexl?

If not, it looks like one could perhaps extend FlatResolver to handle
something like:

systemClass=java.lang.System.class;

and then use it as follows:

systemClass.currentTimeMillis();

Or is this destined to fail?


Or am I way off
On 12/05/2008, Dion Gillard <dion@trongus.com> wrote:
> Yes.
>
>  See
>  http://svn.apache.org/repos/asf/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/JexlTest.java
>  Look for
>
>  testStaticMethodInvocation and testStaticMethodInvocationOnClasses
>
>
>
>  On Fri, May 9, 2008 at 1:26 AM, sebb <sebbaz@gmail.com> wrote:
>
>  > JEXL can access instance methods via the objects that are passed to
>  > the interpreter.
>  >
>  > Is it possible to access static methods in Jexl?
>  >
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  > For additional commands, e-mail: user-help@commons.apache.org
>  >
>  >
>
>
>
>  --
>  dIon Gillard
>  "Any sufficiently advanced technology is indistinguishable from magic" -
>  Arthur C. Clarke 1917 - 2008
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message