I want to know if there is any way to convert a String to Java compilable code.
I have a comparative expression saved in a database field. I want to re
You'd be much better off mapping your database condition info to an object and either implementing an equals method on it that you can use with BeanPropertyValueEqualsPredicate from the apache commons beanutils or implement Comparable instead. This should do what you're after without all the magic compiler nastiness or security issues of converting strings to code.