Replace AWT getPeer() method
MSALThis recipe replaces the use of getPeer() method in java.awt.* classes. component.getPeer() != null is replaced with component.isDisplayable() and component.getPeer() instanceof LightweightPeer is replaced with component.isLightweight().
org. openrewrite. java. migrate. ReplaceAWTGetPeerMethodOptional
A method pattern matching the getPeer() method to replace.
The fully qualified name of the LightweightPeer interface to replace in instanceof.
mod run . --recipe= org. openrewrite. java. migrate. ReplaceAWTGetPeerMethodInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.