walkmod-javalang-plugin

Walkmod plugin to add the java.io.Serialiable into the implements list.

License

License

GroupId

GroupId

org.walkmod
ArtifactId

ArtifactId

walkmod-serializable-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

walkmod-javalang-plugin
Walkmod plugin to add the java.io.Serialiable into the implements list.
Project URL

Project URL

https://github.com/rpau/walkmod-serializable-plugin
Source Code Management

Source Code Management

https://github.com/rpau/walkmod-serializable-plugin

Download walkmod-serializable-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/org.walkmod/walkmod-serializable-plugin/ -->
<dependency>
    <groupId>org.walkmod</groupId>
    <artifactId>walkmod-serializable-plugin</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.walkmod/walkmod-serializable-plugin/
implementation 'org.walkmod:walkmod-serializable-plugin:1.0.0'
// https://jarcasting.com/artifacts/org.walkmod/walkmod-serializable-plugin/
implementation ("org.walkmod:walkmod-serializable-plugin:1.0.0")
'org.walkmod:walkmod-serializable-plugin:jar:1.0.0'
<dependency org="org.walkmod" name="walkmod-serializable-plugin" rev="1.0.0">
  <artifact name="walkmod-serializable-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.walkmod', module='walkmod-serializable-plugin', version='1.0.0')
)
libraryDependencies += "org.walkmod" % "walkmod-serializable-plugin" % "1.0.0"
[org.walkmod/walkmod-serializable-plugin "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.walkmod : javalang-compiler jar [2.0, 3.0)
org.walkmod : walkmod-core jar [1.0.0,3.0.0)

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

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.

Versions

Version
1.0.0