Bytecode Analysis for Checking Java Access Modifiers

Andreas Müller

Research output: Chapter in Book/Report/Conference proceedingConference proceedings

Abstract

When compiling a Java program, too restrictive access modifiers immediately lead to compilation errors. However, developers do not even get informed, if an access modifier could be more restrictive.We developed a tool called AccessModifierAnalyzer (AMA) that reports insufficiently restrictive Java access modifiers based on a static bytecode analysis. AMA analyses fields and methods and reports on visibility modifiers, the static modifier, and the final modifier. It can either be used as a stand-alone application, as part of an Apache Ant script, or as a NetBeans plug-in. In this paper, we motivate the need for a report on insufficiently restrictive access modifiers and give an overview of the architecture and usage of AMA.
Original languageEnglish
Title of host publicationProceedings of the Work-in-Progress Session at the 8th International Conference on the Principles and Practice of Programming in Java (PPPJ 2010)
PublisherCEUR-WS
Number of pages4
Volume692
Publication statusPublished - 2010

Fields of science

  • 102 Computer Sciences
  • 102015 Information systems
  • 102027 Web engineering

JKU Focus areas

  • Computation in Informatics and Mathematics

Cite this