ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank-Michael Moser <mo...@decodon.com>
Subject Re: ClassFileSet method of loading classes
Date Tue, 17 Dec 2002 18:05:13 GMT
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 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 bytecode can't result in finding any dependencies to 
MyClass.

Some time ago, when I started to use an obfuscator, I ran into this 
obstacle, too.

Frank-Michael


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message