I thought of that but parsing a text document is error prone and subject to
change as javap evolves so I figured using reflection would be the most reliable
and consistent method.

I was just hoping some of the builders here have had similar requirements and
would have some suggestions as to how to accomplish this task.

Thanks for your response,
Bill

-----Original Message-----
From: [EMAIL PROTECTED] 
Sent: Wednesday, June 13, 2001 9:27 AM
To: [EMAIL PROTECTED]
Subject: Re: Comparing Method signatures from one build to next


Have you thought of running javap on the class files and comparing the
output? Or is that too simplistic an approach?

From: "William Settle" <[EMAIL PROTECTED]>

>
> My goal is to be able to compare runtime files, specifically, jar's,
war's and
> ear's and produce difference documents with what method signatures have
been
> changed or deleted at a minimum.
>
> To do this I would have to iterate through the archive then use
reflection to
> gather class information for a particular build and create a persistent
> object/method hierarchy somewhere (I'm thinking an LDAP tree).  Then I
would
> compare this to a previous build to get the changes.  Not a big job but
still a
> good bit of code to make it happen.
>
> What this will give us is the ability to verify we didn't "break" an
interface
> or required API, even at the customer's site, if we made a change and
shipped
> them a new archive.
>
> I have looked at Sitraka's JClass utility and it has some of the features
I want
> but is not 100% pure Java so it's out of the running.
>
> Does anyone have any ideas on how to accomplish this task?
>
> Thanks again,
> Bill

Reply via email to