Mutability Detector

A lightweight analysis tool for detecting mutability in Java classes
Download

Mutability Detector Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Apache
  • Publisher Name:
  • Grundlefleck
  • Publisher web site:
  • http://code.google.com/u/Grundlefleck@gmail.com/
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 323 KB

Mutability Detector Tags


Mutability Detector Description

Mutability Detector is a free and open-source application that was created to analyze Java classes and report on whether instances of a given class are immutable.It is intended that Mutability Detector will be usable at runtime, as part of your Java application, as a standalone task, or integrating with your unit testing library of choice.Developing classes to be immutable has several benefits. An immutable object is one which cannot be changed once it is constructed. While writing concurrent programs, using immutable objects can greatly simplify complex systems, as sharing an object across threads is much safer. There are a few rules for what makes an object immutable, and it is easy to break the rules and render the object unsafe. This could lead to subtle, hard-to-detect bugs which could lower the integrity of the system. Using an automated tool to recognise mutability where it's not intended can reduce the complexity of writing immutable classes.Mutability Detector is in the very early stages of development. To give an idea of the performance, on a Thinkpad T61 the tool runs over the JVM's rt.jar (48MB, 17,000 classes) in under 2 minutes.The tool analyses on the strict side, very few classes are found to be perfectly immutable, for instance, java.lang.String and java.lang.Integer are not immutable because of a non-final field, and primitive array field, respectively. Mutability Detector will not be released under a 1.0 version until these cases can be correctly analysed.Detailed instructions on how to install and use the Mutability Detector utility on your Mac are available HERE.Mutability Detector is a cross-platform utility capable of running on any operating system that comes with Java support (e.g. Mac OS X, Windows, Linux)


Mutability Detector Related Software