Immuter Free download

Immuter

  • Publisher:Michael Bayne
  • Version:
  • Operation System:Mac OS X
  • License:BSD
  • File Size:4 KB
Download

Total Downloads:522

Immuter Description

A javac annotation processor that makes Java variables default to immutable
Ever thought that final should be the default in Java? Well, now you can easily and quickly make this true with the Immuter javac plugin. Just follow the simple instructions below to integrate this into your build and reap the benefits of immutable by default.What does it do?It is very simple. All variables are converted to final by default. If you want a non-final variable, you have to annotate it with the @var.Note: you can put final on your variables manually if you like but it is redundant. If you define a variable as @var final type name then the program will assume you want it final and leave it final, but it will also emit a warning. So, don't do that!Moreover, because of the way the javac Annotation Processing API works, it is not possible to tell javac that your plugin needs to see every source file (which you do by saying you handle all annotation types) and then tell it that you handled some of those annotations. In fact, if you use any other annotations (like JUnit's @Test annotation for example), javac will start complaining that nothing is handling those annotations either.If you know that you're not using any other annotation processors, you can pass an argument to the immuting processor and tell it to go ahead and claim that it handled all annotations in all of your files. This will suppress all such warnings, which is very nice. It will also prevent any other annotation processor from getting a chance to operate on your code, so don't do it if you need to use any other annotation processors in conjunction with the immuter. Requirements:
· Java

© Copyright 2004-2015 www.softwares7.com All rights reserved.