Article View: borland.public.jbuilder.java.language
Article #19606Inner Classes & this$0
From: Barry Donovan
Date: Tue, 13 Jan 1998 00:00
Date: Tue, 13 Jan 1998 00:00
64 lines
1995 bytes
1995 bytes
Hi,
I'm experiencing problems with Inner classes and this$0. The code
compiles OK with
the Sun and Symantec Compilers but not under JBuilder - it seems I
cannot call any of the
outer class methods or access any of the outer class attributes. I
see a few people have previously
mentioned problems with Inner classes & the JBuilder compiler but
noone from Borland has
made any comment.
Can someone please tell me what is wrong with this piece of code?
Thanks for your help in this matter,
Barry Donovan.
A.java:
package com.blah.blah;
public class A extends Object
{
public A()
{
}
public void someMethod()
{
}
class B
{
public B()
{
this$0.someMethod(); // Call the outer class
someMethod as opposed to inner class.
}
public void someMethod()
{
}
}
}
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Barry Donovan
Chief Software Engineer
Nifco Synergy Ltd. http://www.nifcosynergy.com
E-MAIL: barry@nifcosynergy.com
Phone: (604) 986-0889 ext. 133
Fax: (604) 986-0869
ADDRESS: 2030 Marine Drive, Suite 100
North Vancouver, B.C. Canada V7P 1V7
Bite my lips and close my eyes - take me away to Paradise.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID:
<34BC0487.9EBB9687@nifcosynergy.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,af8275ac87b32045,start X-Google-Attributes: gidf74b3,public From: Barry Donovan <barry@nifcosynergy.com> Subject: Inner Classes & this$0 Date: 1998/01/13 Message-ID: <34BC0487.9EBB9687@nifcosynergy.com> X-Deja-AN: 315698616 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: None Newsgroups: borland.public.jbuilder.java.language