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

enum should be in their own files #37

Open
redwarp opened this issue Jan 8, 2016 · 1 comment
Open

enum should be in their own files #37

redwarp opened this issue Jan 8, 2016 · 1 comment

Comments

@redwarp
Copy link
Contributor

redwarp commented Jan 8, 2016

I think enums, being specific class, should be also defined in a specific json file, with of format like

{
    "do_json": true,
    "package": "com.yelp.android.biz.serializable",
    "type": "enum",
    "values": [
        "VALUE_1",
        "VALUE_2",
        ...
    ]
}

The fact that they are currently generated inside another class makes it impossible to reuse them among parcel generated classes.

@jbrick
Copy link
Contributor

jbrick commented Jan 8, 2016

The counterargument is what happens when you have two parcel generate classes that define an enum of the same name, but for different purposes?

We originally had them separated, but decided we wanted to be safe and avoid this problem.

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

No branches or pull requests

2 participants