java - How can I tell which constructor to use on an inner (member) class? -


reflective instantiation of inner class requires constructor takes synthetic parameter, instance of enclosing class. if inner class static, there no such constructor.

i can tell class inner class using class.ismemberclass() method, can't see neat way of determining whether or not member class static or not, how expect figure out constructor call.

is there neat way tell?

see examining class modifiers tutorial. think it's like

modifier.isstatic(myclass.getmodifiers()); 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -