ChangeModifiers

Changing the modifiers.

Description

The changeModifiers action allows for the modification of modifiers. Changing the modifiers is available for field, class, method and parameter.

Configuration options

The configuration for the changeModifiers action works by selecting the desired modifier and selecting if it should be present or not. There is one exception which is the visibility modifier which can only be one at a time.

changeModifiers:
  final: true
  class SomeClass {
-     public String s;
+     public final String s;
  }

abstract

This option make sure the abstract modifier is (not) present.

final

This option make sure the final modifier is (not) present.

static

This option make sure the static modifier is (not) present.

strictfp

This option make sure the strictfp modifier is (not) present.

synchronized

This option make sure the synchronized modifier is (not) present.

transient

This option make sure the transient modifier is (not) present.

volatile

This option make sure the volatile modifier is (not) present.

visibility

Changes the visibility of the target. The options are: (empty), private, public or protected.

changeModifiers:
  visibility: "private"
  class SomeClass {
-     public String s;
+     private String s;
  }