walkmod-serializable-plugin
This is a walkmod plugin to add implements java.io.Serializable
in all Java classes (root and nested).
Example
Let’s see an example. Take a look to this code. This is a class that does not implement Serializable
package example;
public class Foo{
void hello(){
...
}
}
What this plugins generates is the following modified code:
package example;
public class Foo implements java.io.Serializable{
void hello(){
...
}
}
Usage
Only for walkmod >= 2.2.0
In order to add this code transformation as part of your code conventions, execute:
walkmod add serializable
And then you see the results executing the following command:
$ walkmod apply
Or, alternativelt, you can also check which would be the modified classes typing:
$ walkmod check
Contributing
If you want to hack on this, fork it, improve it and send me a pull request.
To get started using it, just clone it and call mvn install.