In Java, is it possible to access class defined in method by some means (reflections or so)? And How?
For example, i want to create instance of InnerClass in example below:
class Example {
public void outerMethod() {
class InnerClass {
double d = 0;
}
}
public void testMethod() {
outerMethod::InnerClass instance = new outerMethod::InnerClass();
}
}
Thanks for answers.
Aucun commentaire:
Enregistrer un commentaire