是否ProGuard的将所有枚举为int或者需要为此进行配置 [英] Does proguard converts all enums to int or needs to be configured for this

查看:287
本文介绍了是否ProGuard的将所有枚举为int或者需要为此进行配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

难道ProGuard的自动转换枚举到整数的内存优化或我必须把它配置做到这一点? 如果我需要配置什么配置?

解决方案

优化上列出的ProGuard的优化页面。这似乎是默认的优化,但它(像其他优化)可以明确指定,如果你需要更多的控制(例如禁用所有类/ * 优化除了枚举拆箱)。

  

类/拆箱/枚举

     
    

简化枚举类型整型常量,只要有可能。

  

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?

解决方案

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.

这篇关于是否ProGuard的将所有枚举为int或者需要为此进行配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆