[webbeans-dev] Questions & clarifications

Gavin King gavin at hibernate.org
Wed Oct 29 13:13:47 EDT 2008


Are you sure this is true of *static* inner classes?

On Wed, Oct 29, 2008 at 11:08 AM,  <pmuir at redhat.com> wrote:
> Just that invoking inner class constructors via reflection is a bit like
> black magic - is this definitely something we want to do...
>
> --
> Pete Muir
> http://in.relation.to/Bloggers/Pete
>
> On 29 Oct 2008, at 15:58, "Gavin King" <gavin at hibernate.org> wrote:
>
>> On Tue, Oct 28, 2008 at 10:16 AM, Pete Muir <pmuir at redhat.com> wrote:
>>
>>>> 3.2.5.1 Declaring a Web Beans constructor
>>>
>>>
>>>> If a simple Web Bean defined using annotations does not explicitly
>>>> declare
>>>> a constructor using @Initializer, the constructor that accepts no
>>>> parameters
>>>> is the Web Bean constructor.
>>>
>>>
>>> It is possible to call constructors by reflection on inner classes, but
>>> it
>>> requires you to rely on the (AFAIK unspecified) behaviour that the inner
>>> class instance holds a reference to it's parent instance in the
>>> "this$<x>"
>>> field, where
>>>
>>> x = (level-of-nesting - 1)
>>>
>>> WDYT?
>>
>> I don't understand what you're suggesting here, Pete.
>>
>>
>> --
>> Gavin King
>> gavin.king at gmail.com
>> http://in.relation.to/Bloggers/Gavin
>> http://hibernate.org
>> http://seamframework.org
>
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev
>



-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list