Suppose you have a text file like:
my_setting = ON some_method = METHOD_A verbosity = DEBUG ...
That you wish to to update a corresponding
You have an extra getClass call, and you have to cast (more specific cast per Bozho):
getClass
field.set(test, Enum.valueOf((Class) field.getType(), value));