Replace direct field access by setter and getter

已回答

I want to move a non static method into another class. To make the code working the fields must be accessed by setter/getter instead of directly using them. Is there a possibility to do the replacment using IDEAs "structural replacement"?
Original class:


Desired result after replacement:

1
Avatar
Permanently deleted user

Refactor.Encapsulate Fields

Alain

5
Avatar
Permanently deleted user

"There isn't anything that IDEA can't do."
Thank you.
Andre

2

Wow, I'm impressed too!

0

请先登录再写评论。