Re: ClassFileSet method of loading classes

2002-12-19 Thread Frank-Michael Moser
Conor MacNeill wrote: No, I think that would involve the halting problem :-). My fix is most likely compiler-specific and depends on how the compiler names the implicit Class instances. Maybe not that desirable. Let me know what you think. I just checked out and built most recent Ant 1.5.9.

Re: ClassFileSet method of loading classes

2002-12-19 Thread Conor MacNeill
Frank-Michael Moser wrote: This would be nice, I will test it... OK, I've committed it now. What do you have in mind for patching this case - testing whether a string given to Class.forName(...) forms a valid class-name or something similar? No, I think that would involve the halting prob

Re: ClassFileSet method of loading classes

2002-12-19 Thread Frank-Michael Moser
Conor MacNeill wrote: Frank-Michael Moser wrote: But now I do. Cast iron ? :-) Not on you or anybody, of course ;) I've done some experiments with changes to ClassfileSet to pickup the dependency. I think it is possible. I'll do some further testing before I commit it (I need to add some

Re: ClassFileSet method of loading classes

2002-12-19 Thread Conor MacNeill
Frank-Michael Moser wrote: But now I do. Cast iron ? :-) OK, I now see what you mean. I agree that ClassfileSet wil not pickup this dependency. I've done some experiments with changes to ClassfileSet to pickup the dependency. I think it is possible. I'll do some further testing before I co

Re: ClassFileSet method of loading classes

2002-12-19 Thread Frank-Michael Moser
Conor MacNeill wrote: Well, I don't know about Retroguard but if you want to experiment with what dependencies can be gleaned from the bytecode, you could try the task with the dump option set to see the output. So I did and found that the depend task is not able to handle our case. Please

Re: ClassFileSet method of loading classes

2002-12-19 Thread Frank-Michael Moser
Conor MacNeill wrote: Should...?! Sure. I don't give cast-iron guarantees :-) But now I do. To prove I attached two Java classes (Root.java and Dependency.java) and a build.xml where the Root class is the root of a classfileset which later is used in a jar task. Root holds a reference to Dep

Re: ClassFileSet method of loading classes

2002-12-19 Thread Frank-Michael Moser
Conor MacNeill wrote: Should...?! Sure. I don't give cast-iron guarantees :-) But now I do. To prove I attached two Java classes (Root.java and Dependency.java) and a build.xml where the Root class is the root of a classfileset which later is used in a jar task. Root holds a reference to D

Re: ClassFileSet method of loading classes

2002-12-19 Thread Conor MacNeill
Frank-Michael Moser wrote: Do you know RetroGuard - an OpenSource obfuscator for Java? http://www.retrologic.com/retroguard-main.html This does definitely not handle MyClass.class notation as dependencies and complains in its log file the usage of Class.forName(...) for all upper cases. This

Re: ClassFileSet method of loading classes

2002-12-19 Thread Conor MacNeill
Frank-Michael Moser wrote: Conor MacNeill wrote: I would think that MyClass should be seen as a dependency (given that this line exists in my rootfileset). This will show up as a dependency (a class reference). It should be picked up. Should...?! Sure. I don't give cast-iron guarantees

Re: ClassFileSet method of loading classes

2002-12-18 Thread Frank-Michael Moser
Conor MacNeill wrote: Frank-Michael Moser wrote: Class.forName("package-of-myclass.MyClass"); In fact, in bytecode it is coded much more near to the latter form, such that looking the bytecode can't result in finding any dependencies to MyClass. I'm not sure on what you are basing this in

Re: ClassFileSet method of loading classes

2002-12-18 Thread Frank-Michael Moser
Conor MacNeill wrote: I would think that MyClass should be seen as a dependency (given that this line exists in my rootfileset). This will show up as a dependency (a class reference). It should be picked up. Should...?! -- To unsubscribe, e-mail: For addition

Re: ClassFileSet method of loading classes

2002-12-18 Thread Conor MacNeill
Frank-Michael Moser wrote: When you examine at the bytecode of your (root-)class you will see that writing MyClass.class is totally equivalent to Class.forName("package-of-myclass.MyClass"); In fact, in bytecode it is coded much more near to the latter form, such that looking the byteco

Re: ClassFileSet method of loading classes

2002-12-18 Thread Conor MacNeill
Aaron Kelley wrote: Does anyone know how the ClassFileSet determines a dependency? I do :-) ClassFileSet works as follows. Firstly it determines a set of root classes. This is either the single class specified by a root element or the set classes included in a rootfileset. These root classes

Re: ClassFileSet method of loading classes

2002-12-18 Thread Frank-Michael Moser
e and try to load a corresponding class - a bytecode inspector could never know about that. -Original Message- From: Frank-Michael Moser [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 11:05 AM To: Ant Users List Subject: Re: ClassFileSet method of loading classes Aaron Kelley wrot

RE: ClassFileSet method of loading classes

2002-12-17 Thread Aaron Kelley
ubject: Re: ClassFileSet method of loading classes Aaron Kelley wrote: > > MyClass myclass = MyFactory.create(MyClass.class); > > I would think that MyClass should be seen as a dependency (given that > this line exists in my rootfileset). So am I using it wrong, or is it > something el

Re: ClassFileSet method of loading classes

2002-12-17 Thread Frank-Michael Moser
Aaron Kelley wrote: MyClass myclass = MyFactory.create(MyClass.class); I would think that MyClass should be seen as a dependency (given that this line exists in my rootfileset). So am I using it wrong, or is it something else? When you examine at the bytecode of your (root-)class you will se