R
Robert Dodier
Hello,
Given something like class Outer { class Inner {...} ... } and an
instance of Outer.Inner.
Is there any way to retrieve a reference to the enclosing instance
without mentioning the class name "Outer" ??
I know that Class.getEnclosingClass can find the enclosing class, but
there
doesn't seem to be a similar object method, say,
"Object.getEnclosingInstance".
I am trying to process multiple, undetermined classes in a uniform
way,
so if possible I want to avoid peppering the code with literal class
names.
Thanks for any information.
Robert Dodier
Given something like class Outer { class Inner {...} ... } and an
instance of Outer.Inner.
Is there any way to retrieve a reference to the enclosing instance
without mentioning the class name "Outer" ??
I know that Class.getEnclosingClass can find the enclosing class, but
there
doesn't seem to be a similar object method, say,
"Object.getEnclosingInstance".
I am trying to process multiple, undetermined classes in a uniform
way,
so if possible I want to avoid peppering the code with literal class
names.
Thanks for any information.
Robert Dodier