[fpc-devel] FPC-JVM: Breaking up a cycle

Sven Barth pascaldragon at googlemail.com
Sat Aug 27 11:33:42 CEST 2011

On 27.08.2011 00:49, Jonas Maebe wrote:
> On 27 Aug 2011, at 00:16, Sven Barth wrote:
>> I have now ported most of the contents of the android namespace to Pascal. First I tried to put the subnamespaces into their own units, but that started to result in some nasty circles that involved parent classes and what not... now I have simply put the complete android namespace into one unit and at first I had quite a few order problems to solve
> BTW: the javapp program normally solves the ordering problem for you. However, it can't do that if there are circular references... Normally, you'd solve those by specifying the classes whose removal results in breaking the circle(s) using the "-a" parameter of javapp (it will then turn those classes into an empty definition), but that only works for top-level classes.

Besides the AVViewGroup problem there weren't any circles, but javapp 
failed to order the other classes correctly... it had reported messages 
for them though like "AVDontKnow is part of circle []" or so (I don't 
remember the message exactly anymore, but the brackets were empty, while 
they weren't for AVView, AVViewManager and AVViewGroup).

While we're at it: for one class (android.os.FileObserver, see here: 
http://developer.android.com/reference/android/os/FileObserver.html ) it 
generated the following:

=== source begin ===

     procedure <init>_(para1: JLString); overload; virtual;
     procedure <init>_(para1: JLString; para2: jint); overload; virtual;

=== source end ===

These should be constructers, shouldn't they? Other constructors (even 
with parameters) were converted correctly.

Besides this javapp is a invaluable tool for Pascal developers :D


More information about the fpc-devel mailing list