I assume you're referring to instanceKlass::_host_klass? The comment on
that field says it's only non-null for an anonymous class, no mention of
named inner classes.  Are you sure it's used for named inner classes to
point back to their parent?

Cheers

Sent from my phone
On May 25, 2012 6:06 PM, "Rémi Forax" <fo...@univ-mlv.fr> wrote:

> On 05/25/2012 11:55 PM, Vitaly Davidovich wrote:
>
>> In case it's not clear, by JVM not allowing them I simply mean that it
>> doesn't know about nested classes (not a first class concept), so since
>> it's emulated by javac, javac creates these package private synthetic
>> accessors.
>>
>
> BTW, the VM knows what an anonymous class is
> (there is an host class field in the runtime class meta-data),
> it's more a class format issue now, i.e. the class format
> doesn't support to put more than one class in a .class
> classfile.
>
> Rémi
>
>
>> Sent from my phone
>> On May 25, 2012 5:50 PM, "Vitaly Davidovich"<vita...@gmail.com>  wrote:
>>
>>  This is specific to private fields in inner classes - java allows access
>>> to them from the outer class, but the JVM doesn't so javac generates
>>> synthetic accessor methods for them.  Don't think it's a problem for JIT
>>> compiler though as it should inline them.
>>>
>>> Sent from my phone
>>> On May 25, 2012 5:23 PM, "Ulf Zibis"<ulf.zi...@gmx.de>  wrote:
>>>
>>>  Am 25.05.2012 22:30, schrieb Jeff Hain:
>>>>
>>>>  Hello.
>>>>>
>>>>>  In HashMap, the class Holder should not declare the static final
>>>>> fields
>>>>>
>>>>>> 'private' because the compiler will generate an accessor in that case,
>>>>>>
>>>>>>  I wasn't aware that making fields private could have a downside
>>>>> (other than making them non-visible).
>>>>>
>>>>> Could you, or anyone, please give (a link to) more info about this?
>>>>>
>>>>>  I'm interested too.
>>>>
>>>> -Ulf
>>>>
>>>>
>>>>
>

Reply via email to