Change annotation attribute name

Apache 2.0

Some annotations accept arguments. This recipe renames an existing attribute.

org.openrewrite.java.ChangeAnnotationAttributeName

Required

The fully qualified name of the annotation.

The name of attribute to change.

The new attribute name to use.

mod run . --recipe=org.openrewrite.java.ChangeAnnotationAttributeName \ -P annotationType=org.junit.Test \ -P oldAttributeName=timeout \ -P newAttributeName=waitFor

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.