ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvhol...@computer.org
Subject Antwort: Re: Displaying the value in a Java class?
Date Fri, 10 Feb 2006 16:10:32 GMT
Hello,

i think, what you try to do doesnt work this way.
The BCEL - thing reads the class-file, knows about the internal layout and 
can find out things about it.
One of these is the constant - pool. Strings, doubles, long constants are 
put there by the compiler

your public final static xxxx  is not included there. It is a 
(class-)member, which contains a reference to
some other object (probably in another class). This reference is resolved 
when the class is loaded (simplfied).
So, i would be surprised if you find what you are looking for in your 
class-file.

I would go another way: because the class-file is available for ant, why 
not write a simple task to instantiate your class,
query the property and convert the result to a string. 
Some template for a user-defined task should be available somewhere.

HTH
dvholten
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message