Reputation: 7963
i try to find at run time the fully qualified type of the field type using reflection like the following.
if(! Modifier.isFinal(f.getModifiers()) && type.equals(Integer.class)){
f.set(clsObject, DefaultParamValuesEnum.INTEGER.getDefaultInt());
}
when i try like the following for enum it gives exception :
else if(! Modifier.isFinal(f.getModifiers()) && type.equals(enum.class)){
f.set(clsObject,DefaultParamValuesEnum.LONGVALUE.getDefaultLong());
}
following error i get:
Syntax error on token "enum", invalid
How to figure out the enum type?
would some one help me on this please.
Upvotes: 1
Views: 131