I think you already tried yourself the first snippet and it threw NullPointerException. The only difference with using reflection it that it will work with a null reference if the method is static. If not static - you will get the exception again.
posted 13 years ago
Thanks Buddy, But the method is not static...so as you say there's probably no other way to do such thing. Thanks
SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)
What's that smell? Hey, sniff this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database