vendredi 25 mars 2016

Write a condition as String

I have the need to write a java programm wich reads rules (conditions) from a file. This rules have to be transformed in conditions in java. The problem is that i don't know how transform this "String" rules to java "conditions".

For example, the rules like:

x != y

or

n >= 0 && s == n

and the condition in java

if(rule){......} else{....}

How can I made this possible?

Aucun commentaire:

Enregistrer un commentaire