Closed yshrsmz closed 6 years ago
It looks like Class#getFields
(which is used to retrieve fields from library classes) does not return private fields.
So if we use Class#getDeclaredFields
(which returns all declared fields regardless of its modifier), it should be ok.
sample: https://github.com/cmelchior/realmfieldnameshelper/compare/master...yshrsmz:kotlin-class
Kotlin 1.1.4-3 Realm 3.7.2 RealmFieldsNameHelper 1.1.1
In the above example, I added a
LibraryModel2
in example-library module which looks like this:and modified
Person
class as below:generated fields class looks like this.
Apparently,
PersonFields
does not contain field names ofLibraryModel2