When using reflection, you'll find constructors of that inner class taking an instance of the outer class as an additional argument (always the first) .
See these questions for related information:
Instantiating inner class
How can I instantiate a member class through reflection on Android
In Java, how do I access the outer class when I'm not in the inner class?
You need to jump through a few hoops to do this. First, you need to use
Class.getConstructor() to find the Constructor object you want to invoke:
Returns a Constructor object that reflects the specified public
constructor of the class represented by this Class object. The
parameterTypes parameter is an array of Class objects that identify
the constructor's formal parameter types, in declared order. If this
Class object represents an inner class declared in a non-static
context, the formal parameter types include the explicit enclosing
instance as the first parameter.
And then you use
If the constructor's declaring class is an inner class in a non-static
context, the first argument to the constructor needs to be the