You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2002/09/21 14:33:25 UTC
[commons] Reflection code
I have started writing the reflection code for the new [lang] reflection
subpackage.
A fair bit of the basic stuff is now done (its in lang sandbox if you're
looking). It still needs tests.
What I'm looking for is
- any code that already exists for assisting with reflection (I've already
got beanutils)
- any code that can match classes against the Java LanguageSpecification
rules for widening
- any tests that already exist for reflection
Any code from within commons or elsewhere is welcome to be looked at ;-)
Hyperlinks, not attachments, if possible please.
Stephen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by Henri Yandell <ba...@generationjava.com>.
I got this put together over the weekend. It's very interesting. I got to
use Dynamic Proxies for the first time, and adore them. So that could be
dangerous :)
It's probably grown a bit beyond a simple thing to throw into your
reflection soup, so I'll continue to grow it a bit.
Hen
On Sat, 21 Sep 2002, Henri Yandell wrote:
>
> An idea someone gave me yesterday was:
>
> RandomBeanMaker.
>
> rbm = new RandomBeanMaker();
> rbm.setMaker( new MyComplexNumberMaker() );
> Person person = (Person)rbm.make(Person.class);
>
> or just:
>
> Person person = (Person)RandomBeanMaker.make(Person.class);
>
> if you didn't want to make random fields for non-JDK properties.
>
> It's on my todo, but is a cool idea and thought I'd float it into
> Reflection code.
>
> Hen
>
> On Sat, 21 Sep 2002, Stephen Colebourne wrote:
>
> > I have started writing the reflection code for the new [lang] reflection
> > subpackage.
> >
> > A fair bit of the basic stuff is now done (its in lang sandbox if you're
> > looking). It still needs tests.
> >
> > What I'm looking for is
> > - any code that already exists for assisting with reflection (I've already
> > got beanutils)
> > - any code that can match classes against the Java LanguageSpecification
> > rules for widening
> > - any tests that already exist for reflection
> >
> > Any code from within commons or elsewhere is welcome to be looked at ;-)
> > Hyperlinks, not attachments, if possible please.
> >
> > Stephen
> >
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by Henri Yandell <ba...@generationjava.com>.
An idea someone gave me yesterday was:
RandomBeanMaker.
rbm = new RandomBeanMaker();
rbm.setMaker( new MyComplexNumberMaker() );
Person person = (Person)rbm.make(Person.class);
or just:
Person person = (Person)RandomBeanMaker.make(Person.class);
if you didn't want to make random fields for non-JDK properties.
It's on my todo, but is a cool idea and thought I'd float it into
Reflection code.
Hen
On Sat, 21 Sep 2002, Stephen Colebourne wrote:
> I have started writing the reflection code for the new [lang] reflection
> subpackage.
>
> A fair bit of the basic stuff is now done (its in lang sandbox if you're
> looking). It still needs tests.
>
> What I'm looking for is
> - any code that already exists for assisting with reflection (I've already
> got beanutils)
> - any code that can match classes against the Java LanguageSpecification
> rules for widening
> - any tests that already exist for reflection
>
> Any code from within commons or elsewhere is welcome to be looked at ;-)
> Hyperlinks, not attachments, if possible please.
>
> Stephen
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/22/02 5:35 AM, "Stephen Colebourne" <sc...@btopenworld.com>
wrote:
> I took a brief look at the velocity link and its mostly about introspection.
> I will take a fuller look in a few days.
>
> The code for [lang] will be simple reflection helpers, not introspection.
> However, the fact that you want to do introspection differently from
> velocity shows to me that we need a commons [introspect] or [clazz] project.
That's not what it shows me. :)
It shows me I wanted to keep jexl and velocity separate. Velocity has some
required behaviors that aren't general (actually, weird..) and I didn't want
to work around them in Jexl nor force velocity to change.
What I plan to do is sort things out in Jexl, and if indeed it remains
general and not specific to Jexl functionality, sure - I'll happily roll it
out to a commons component.
What I don't want to do is have the tail wag the dog - the introspection
functionality is core to Jexl, and as we found out recently, the desire of
the many don't always match the requirements of the few.
> This would hopefully gather together the introspection code from velocity
> and jexl. It could also enable betwixt and digester to be more flexible in
> matching property methods. This is currently next on my list after [lang]
> reflection. Interested?
Right now, the Jexl code is the Velocity code, and when I dig out of the
current pile of rubble I'm in, the Jexl code will be cleaned up. That would
be a good candidate for a general package.
So let me see how it works out - again, I don't want Jexl's core
functionality be dictated by the requirement of generalization. I am all
for generalization if it can be done, but there are some things in the
pipeline for jexl that I'm not sure will work out in a general package.
>
> Stephen
>
> ----- Original Message -----
> From: "Geir Magnusson Jr." <ge...@optonline.net>
>> On 9/21/02 12:37 PM, "robert burrell donkin" <ro...@mac.com> wrote:
>>
>>> take a look at package org.apache.velocity.util.introspection
>>>
>>> (http://jakarta.apache.org/velocity/api/index.html is the api url.)
>>>
>>
>> I've also pulled it out and put in jexl, as I want to do thing differently
>> in Jexl than in Velocity.
>>
>>
>>> - robert
>>>
>>> On Saturday, September 21, 2002, at 01:33 PM, Stephen Colebourne wrote:
>>>
>>>> I have started writing the reflection code for the new [lang]
> reflection
>>>> subpackage.
>>>>
>>>> A fair bit of the basic stuff is now done (its in lang sandbox if
> you're
>>>> looking). It still needs tests.
>>>>
>>>> What I'm looking for is
>>>> - any code that already exists for assisting with reflection (I've
> already
>>>> got beanutils)
>>>> - any code that can match classes against the Java
> LanguageSpecification
>>>> rules for widening
>>>> - any tests that already exist for reflection
>>>>
>>>> Any code from within commons or elsewhere is welcome to be looked at
> ;-)
>>>> Hyperlinks, not attachments, if possible please.
>>>>
>>>> Stephen
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.
>>>> org>
>>>> For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.
>>>> org>
>>>>
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>>>
>>
>> --
>> Geir Magnusson Jr.
>> Research & Development, Adeptra Inc.
>> geirm@adeptra.com
>> +1-203-247-1713
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
FYI i've just committed a workaround for a reflection issue in methodutils.
see thread starting http://marc.theaimsgroup.com/?l=jakarta-commons-user&
m=103251991107100&w=2 for more details.
- robert
On Sunday, September 22, 2002, at 10:35 AM, Stephen Colebourne wrote:
> I took a brief look at the velocity link and its mostly about
> introspection.
> I will take a fuller look in a few days.
>
> The code for [lang] will be simple reflection helpers, not introspection.
> However, the fact that you want to do introspection differently from
> velocity shows to me that we need a commons [introspect] or [clazz]
> project.
> This would hopefully gather together the introspection code from velocity
> and jexl. It could also enable betwixt and digester to be more flexible in
> matching property methods. This is currently next on my list after [lang]
> reflection. Interested?
>
> Stephen
>
> ----- Original Message -----
> From: "Geir Magnusson Jr." <ge...@optonline.net>
>> On 9/21/02 12:37 PM, "robert burrell donkin" <ro...@mac.com>
>> wrote:
>>
>>> take a look at package org.apache.velocity.util.introspection
>>>
>>> (http://jakarta.apache.org/velocity/api/index.html is the api url.)
>>>
>>
>> I've also pulled it out and put in jexl, as I want to do thing
>> differently
>> in Jexl than in Velocity.
>>
>>
>>> - robert
>>>
>>> On Saturday, September 21, 2002, at 01:33 PM, Stephen Colebourne wrote:
>>>
>>>> I have started writing the reflection code for the new [lang]
> reflection
>>>> subpackage.
>>>>
>>>> A fair bit of the basic stuff is now done (its in lang sandbox if
> you're
>>>> looking). It still needs tests.
>>>>
>>>> What I'm looking for is
>>>> - any code that already exists for assisting with reflection (I've
> already
>>>> got beanutils)
>>>> - any code that can match classes against the Java
> LanguageSpecification
>>>> rules for widening
>>>> - any tests that already exist for reflection
>>>>
>>>> Any code from within commons or elsewhere is welcome to be looked at
> ;-)
>>>> Hyperlinks, not attachments, if possible please.
>>>>
>>>> Stephen
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.
>>>> org>
>>>> For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.
>>>> org>
>>>>
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>>>
>>
>> --
>> Geir Magnusson Jr.
>> Research & Development, Adeptra Inc.
>> geirm@adeptra.com
>> +1-203-247-1713
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
[beanutils] time for another release?
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
it's been almost a month since the last beanutils release. there has been
one significant addition to the code base since then: localizable versions
of the main classes. there are still quite a few outstanding issues and
bug fixes but i'm feeling well enough to start squashing them again now.
if we come with a plan to fix the outstanding bugs and if someone with
deadelus karma would volunteer to act as release manager then we could
push out a version with these (much needed) additions before we get
involved with any refactoring involving the reflection code.
what do other people think?
- robert
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by Stephen Colebourne <sc...@btopenworld.com>.
I took a brief look at the velocity link and its mostly about introspection.
I will take a fuller look in a few days.
The code for [lang] will be simple reflection helpers, not introspection.
However, the fact that you want to do introspection differently from
velocity shows to me that we need a commons [introspect] or [clazz] project.
This would hopefully gather together the introspection code from velocity
and jexl. It could also enable betwixt and digester to be more flexible in
matching property methods. This is currently next on my list after [lang]
reflection. Interested?
Stephen
----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
> On 9/21/02 12:37 PM, "robert burrell donkin" <ro...@mac.com> wrote:
>
> > take a look at package org.apache.velocity.util.introspection
> >
> > (http://jakarta.apache.org/velocity/api/index.html is the api url.)
> >
>
> I've also pulled it out and put in jexl, as I want to do thing differently
> in Jexl than in Velocity.
>
>
> > - robert
> >
> > On Saturday, September 21, 2002, at 01:33 PM, Stephen Colebourne wrote:
> >
> >> I have started writing the reflection code for the new [lang]
reflection
> >> subpackage.
> >>
> >> A fair bit of the basic stuff is now done (its in lang sandbox if
you're
> >> looking). It still needs tests.
> >>
> >> What I'm looking for is
> >> - any code that already exists for assisting with reflection (I've
already
> >> got beanutils)
> >> - any code that can match classes against the Java
LanguageSpecification
> >> rules for widening
> >> - any tests that already exist for reflection
> >>
> >> Any code from within commons or elsewhere is welcome to be looked at
;-)
> >> Hyperlinks, not attachments, if possible please.
> >>
> >> Stephen
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.
> >> org>
> >> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.
> >> org>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/21/02 12:37 PM, "robert burrell donkin" <ro...@mac.com> wrote:
> take a look at package org.apache.velocity.util.introspection
>
> (http://jakarta.apache.org/velocity/api/index.html is the api url.)
>
I've also pulled it out and put in jexl, as I want to do thing differently
in Jexl than in Velocity.
> - robert
>
> On Saturday, September 21, 2002, at 01:33 PM, Stephen Colebourne wrote:
>
>> I have started writing the reflection code for the new [lang] reflection
>> subpackage.
>>
>> A fair bit of the basic stuff is now done (its in lang sandbox if you're
>> looking). It still needs tests.
>>
>> What I'm looking for is
>> - any code that already exists for assisting with reflection (I've already
>> got beanutils)
>> - any code that can match classes against the Java LanguageSpecification
>> rules for widening
>> - any tests that already exist for reflection
>>
>> Any code from within commons or elsewhere is welcome to be looked at ;-)
>> Hyperlinks, not attachments, if possible please.
>>
>> Stephen
>>
>>
>> --
>> To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.
>> org>
>> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
>> org>
>>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [commons] Reflection code
Posted by robert burrell donkin <ro...@mac.com>.
take a look at package org.apache.velocity.util.introspection
(http://jakarta.apache.org/velocity/api/index.html is the api url.)
- robert
On Saturday, September 21, 2002, at 01:33 PM, Stephen Colebourne wrote:
> I have started writing the reflection code for the new [lang] reflection
> subpackage.
>
> A fair bit of the basic stuff is now done (its in lang sandbox if you're
> looking). It still needs tests.
>
> What I'm looking for is
> - any code that already exists for assisting with reflection (I've already
> got beanutils)
> - any code that can match classes against the Java LanguageSpecification
> rules for widening
> - any tests that already exist for reflection
>
> Any code from within commons or elsewhere is welcome to be looked at ;-)
> Hyperlinks, not attachments, if possible please.
>
> Stephen
>
>
> --
> To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>