Convert annotated abstract method to field
ProprietaryConverts abstract getter methods annotated with sourceAnnotation to private fields annotated with targetAnnotation. Also removes corresponding abstract setter methods.
org. openrewrite. tapestry. ConvertAnnotatedMethodToFieldRequired
The fully qualified name of the annotation to find on abstract getter methods.
The fully qualified name of the annotation to add to the generated field.
Optional
preserveAnnotationArgumentsBoolean
When true, copies the source annotation's arguments to the target annotation. Use this when the annotation arguments carry semantic meaning in the target framework (e.g., @Persist("session"), @Parameter(required=true)).
mod run . --recipe= org. openrewrite. tapestry. ConvertAnnotatedMethodToField \
-P sourceAnnotation= org. apache. tapestry. annotations. InjectObject \
-P targetAnnotation= org. apache. tapestry5. ioc. annotations. InjectInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.