I've got a xsd file with over 100 types defined in it. I generated java code with xmlbeans binding, and then I can use
MyType.Factory.newInstance();
to get the class instance. But since there are too many types I've decide to use reflection to get create instances for each type.
I can now get the class(interface) of MyType using
Class clz = Class.forName("com.foo.MyType");
But have no idea of how to get the Factory class defined in the MyType interface and then get the new instance.
Any comment or hint is appreciated. Thanks in advance.
you have to use the binary name to refer to inner classes: com.foo.MyType$Factory