Let\'s say I have a file whose format is basic XML, like so:
SomeEnum<
Agree with Oscar Lopez. Here is what i did, a sort of hack.
public static enum Setter {
DYNAMIC_ENUM_EXAMPLE {
@Override
public String setGetValue(String yourValue) {
return "prefix " + yourValue + " postfix";
}
};
public abstract String setGetValue(String value);
}
You can get the value like this :
Setter.DYNAMIC_ENUM_EXAMPLE.setGetValue("namaste")
Output :
prefix namaste postfix