-
expression evaluator
i am trying to create an expression evaluator in java which takes input from a
text file or a user input screen and compare the values with the attributes of an
object in memory thus returning a boolean indicating whether or not the critaria
is satisfied or not .the problem i am facing is to get the name of the field .i
am assuming that the class which will be evaluated with this program have a function
to return the value of the desired field but facing a problem of getting the field
name .please suggest some readings and sites to provide me some info about this
topic
thank you
santosh
-
Re!!
if it is just getting the field name, you can do that using
reflection mechanism.
java.lang.Class has the apis to get the fields, constructors and methods
in a particular object.