Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make nested adapter classes private #2926

Closed
martinbonnin opened this issue Feb 16, 2021 · 0 comments · Fixed by #3314 or #3386
Closed

Make nested adapter classes private #2926

martinbonnin opened this issue Feb 16, 2021 · 0 comments · Fixed by #3314 or #3386

Comments

@martinbonnin
Copy link
Contributor

martinbonnin commented Feb 16, 2021

Follow up from #2924 (review)

Making nested adapter classes private doesn't quite work at the moment because ResponseFields "jump" class nesting:

class Data_Adapter {
  companion object RESPONSE_FIELDS = arrayOf(ResponseField(fieldSets = listOf(
    // Cannot access 'HumanCharacterHero': it is private in 'Hero'`
    FieldSet("Human", Hero.HumanCharacterHero.RESPONSE_FIELDS)
    FieldSet(null, Hero.OtherCharacterHero.RESPONSE_FIELDS)
  ))

    private class Hero {
       private class HumanCharacterHero {...}
       private class OtherCharacterHero {...}
    }  
}

Generating the list of FieldSets in Hero up there would most likely fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant