In android studio or intelliJ, is there any way to...
# random
s
In android studio or intelliJ, is there any way to refactor the Java code to replace attribute access to getters and setters? Context: I have a lib which has a class in kotlin and exposes the properties to java consumers with @jvmField but i am removing them and want to use properties gettter method in java codebase. Something like this:
Copy code
String c = class.property;
to
Copy code
String c =  class.getProperty;
I have 1000+ or more usages like this from this internal lib, what's the best way to migrate from property to method?
c
idea has an encapsulate fields refactoring for java code https://www.jetbrains.com/help/idea/encapsulate-fields.html
s
I don't think so my use-case here is: Encapsulate fields, my goal is to use the kotlin generated getters instead of properties access