Code example:
public class StringHolder{ public static final String ONE = "ONE"; public static final String TWO = "TWO"; public static final String THREE = "THREE"; public static void main (String[] args){ String someVariable = ONE + TWO + THREE; } }
How I can evaluate String value from static constants?. For example, with Intellij Idea I can run program in debug, put break point, press "ctrl+alt+f8" on the expression and see expression value. So is that possible to evaluated this with static analyzer with out compile code and run program? The key point is the value calculated from static constants not from function parameter, so analyzer just "go" to the constant value, concatenate them and show me value in pop-up window.
Another situation when I have a block and "just initialized" variables:
{ final String a = "a"; final String b = "b" final String c = "c" String result = a+b+c; }
P.S. Did you understand me? :)
It is easy with intellij idea 14:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With