Does proguard converts all enums to int or needs to be configured for this

戏子无情 提交于 2019-12-04 02:50:39

问题


Does proguard automatically converts enums to integer for memory optimization or I have to configure it to do this? If I do have to configure what is the configuration?


回答1:


The optimization is listed on ProGuard's optimizations page. It appears to be one of the default optimizations, but it (like other optimizations) can be specified explicitly if you need more control (e.g. disabling all class/* optimizations aside from enum unboxing).

class/unboxing/enum

Simplifies enum types to integer constants, whenever possible.



来源:https://stackoverflow.com/questions/32236870/does-proguard-converts-all-enums-to-int-or-needs-to-be-configured-for-this

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!