Java枚举:列出来自Class的枚举值扩展枚举> [英] Java Enums: List enumerated values from a Class<? extends Enum>
本文介绍了Java枚举:列出来自Class的枚举值扩展枚举>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
类<?extends Enum>
),我需要获取一个列表中的枚举值,这个枚举值
静态函数具有我需要的,但我不知道如何从类对象访问它。解决方案
I've got the class object for an enum (I have a Class<? extends Enum>
) and I need to get a list of the enumerated values represented by this enum. The values
static function has what I need, but I'm not sure how to get access to it from the class object.
解决方案
这篇关于Java枚举:列出来自Class的枚举值扩展枚举>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文