G
Gunther Hebein
Hello,
i am looking for a solution to the following problem.
I have declared a class that contains several static final int constants.
I want to read their values in relation to some String input from a
database.
So if I get the input "DEBUG" in Class A as String from the database I
want to read from Class B its public static final int DEBUG;
if I get instead of "DEBUG" as String for example "LIB", I want to read
from Class B its public static final int LIB with the same code-fragment.
I know that there is a way to do this, but I donm't know exactly how. I
do not want to solve this by if...then or case...switch.
Is there a way to call a funtion from a class with a String, for example
if input String is "DEBUG" to my Class A, it calls B.getDEBUG()?
Kind regards,
gunther
i am looking for a solution to the following problem.
I have declared a class that contains several static final int constants.
I want to read their values in relation to some String input from a
database.
So if I get the input "DEBUG" in Class A as String from the database I
want to read from Class B its public static final int DEBUG;
if I get instead of "DEBUG" as String for example "LIB", I want to read
from Class B its public static final int LIB with the same code-fragment.
I know that there is a way to do this, but I donm't know exactly how. I
do not want to solve this by if...then or case...switch.
Is there a way to call a funtion from a class with a String, for example
if input String is "DEBUG" to my Class A, it calls B.getDEBUG()?
Kind regards,
gunther