"Bytecode Analysis for Checking Java Access Modifiers"
: Proceedings of the Work-in-Progress Session at the 8th International Conference on the Principles and Practice of Programming in Java (PPPJ 2010), Vol. Vol-692, CEUR-WS, 2010
Bytecode Analysis for Checking Java Access Modifiers
Sprache des Titels:
Proceedings of the Work-in-Progress Session at the 8th International Conference on the Principles and Practice of Programming in Java (PPPJ 2010)
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.