Hello, I would like to find nice solution for such task:
I have a Class (for example java.lang.Double)
I would like to invoke its static method valueOf(String string) and get result without creating instance of java.lang.Double.
Is it possible?
Thanks, I've never used it with null because I've missed
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Method.html#invoke(java.lang.Object, java.lang.Object...) If the underlying method is static, then the specified obj argument is ignored. It may be null.