IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Java technology  >  

API Usage Scanner

A Java utility that scans Java bytecode to detect references to targeted APIs.


Date Posted: November 29, 2005
OverviewRequirements Download FAQs Forum Reviews

Update: December 7, 2005

A bug fix for customers using some JREs/JDKs of Version 1.4 and below.

What is API Usage Scanner?

Binary compatibility and toleration are some of the biggest and most frequently-experienced problems for customers. They often run into unpredictable breakages when upgrading or applying services to components of the software stack on which their applications run. One of the leading causes for these breakages is the use of unpublished, internal APIs between software products. Therefore, when an upgrade or service is applied, some internal APIs can change and break the dependent products, thus disrupting the stability of a customer's operation. To maintain and improve product stability, these fragile dependencies must be eliminated.

The API Usage Scanner (AUS) tool can help quickly locate these internal API usages so that compatibility problems can be avoided or remedied. AUS is a pure Java™ utility that scans Java bytecode for references to targeted APIs. In other words, AUS can be used to scan one product to detect the use of another product's internal APIs. Once these usages are identified, the situation can be remedied by replacing those internal APIs with published ones. If a suitable published API is not available, the product team can alert the API developers of the existence of fragile interfaces between the two products and request an agreement to hold that API stable until a suitable replacement can be provided. Several IBM flagship software products have already done this with great success.

Similarly, a service team working on a customer migration can also use AUS to identify the potential breakages when moving from one version of the platform product to another or even from one platform vendor to another. This information can help the service team and their customers reach a better understanding of the risks and the project scope.

The AUS distribution package includes the executable file, an InfoCenter, a "readme" file, and a sample application.

How does it work?

API Usage Scanner takes as input a set of compiled Java code, which could consist of individual class files or class files contained within nested archives such as JAR, WAR, and EAR files. These class files, together with scanning rules, are used by AUS to create a set of reports showing where references to the APIs are found and how those APIs are used.

The reports are generated in both XML and HTML formats by default. The HTML reports are useful for analysis, and the XML reports make it easy to automate further processing of the scan results (for example, to convert them into input for other tools).


About the technology author(s):

API Usage Scanner was developed by the SWG Standards and Development Enablement Team. Two key goals of the team are improving development's ability to ensure release-to-release compatibility of J2EE platform product programming interfaces and to enable cross-version toleration across the software stack. The team works with the SWG development community to identify best practices and develop utilities and technologies that help achieve these compatibility and toleration goals.

The team consists of Alan Hui (team lead, documentation, and requirements), Andy Brodie (architect and lead developer), Chin Sahoo (developer), Linh Nguyen (project management, legal, and InfoCenter), Mary-Rose Fisher (developer), and Rob Beasley (development manager). In addition, the team enjoys technical contributions from Stuart Monteith (Scan Engine architect and developer) of the Java Technology Center at the IBM Hursley laboratory in Hampshire, U.K.


Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other Other company, product, or service names may be trademarks or service marks of others.

Download now Download now

Related technologies

For platform(s):
Java

For topics:
analysis, automation, J2EE, WebSphere Application Server (WAS)


Related resources

Press Articles

 

    About IBM Privacy Contact