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
Post a Comment