I came across this problem that I without knowing the actual enum type I need to iterate its possible values.
if (value instanceof Enum){
Enum enumValue = (Enum)value;
}
Any ideas how to extract from enumValue its possible values ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Call
Class#getEnumConstantsto get the enum’s elements (or get null if not an enum class).