Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 68313 invoked by uid 500); 13 Jun 2001 20:03:30 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 68209 invoked from network); 13 Jun 2001 20:03:27 -0000 Date: Wed, 13 Jun 2001 15:03 -0500 From: "William Settle" To: "ant-user@jakarta.apache.org" Subject: RE: Comparing Method signatures from one build to next Message-ID: <20010613150324130-2e694fa9@alltel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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: ant-user@jakarta.apache.org Sent: Wednesday, June 13, 2001 9:27 AM To: ant-user@jakarta.apache.org 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" > > 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