public static FbxObject createObject(FbxElement element, AssetManager assetManager, String sceneFolderName) {
        String elementName = element.id;
        String subclassName;
        
        if (element.propertiesTypes.length == 3) {
            // FBX 7.x (all objects start with Long ID)
            subclassName = (String) element.properties.get(2);
        } else if (element.propertiesTypes.length == 2) {
            // FBX 6.x (objects only have name and subclass)
            subclassName = (String) element.properties.get(1);
        } else {
            // Not an object or invalid data.
            return null;
        }
        
        Class<? extends FbxObject> javaFbxClass = getImplementingClass(elementName, subclassName);
        
        if (javaFbxClass != null) {
            try {
                // This object is supported by FBX importer, create new instance.
                // Import the data into the object from the element, then return it.
                Constructor<? extends FbxObject> ctor = javaFbxClass.getConstructor(AssetManager.class, String.class);
                FbxObject obj = ctor.newInstance(assetManager, sceneFolderName);
                obj.fromElement(element);
                
                String subClassName = elementName + ", " + subclassName;
                if (obj.assetManager == null) {
                    throw new IllegalStateException("FBXObject subclass (" + subClassName + 
                                                    ") forgot to call super() in their constructor");
                } else if (obj.className == null) {
                    throw new IllegalStateException("FBXObject subclass (" + subClassName + 
                                                    ") forgot to call super.fromElement() in their fromElement() implementation");
                }
                return obj;
            } catch (InvocationTargetException
                    | NoSuchMethodException
                    | InstantiationException
                    | IllegalAccessException ex) {
                // Programmer error.
                throw new IllegalStateException(ex);
            }
        }
        
        // Not supported object.
        return null;
    }
Automatically create an FBXObject by inspecting its class / subclass
properties.

@param element The element from which to create an object.
@param assetManager AssetManager to load dependent resources
@param sceneFolderName Folder relative to which resources shall be loaded
@return The object, or null if not supported (?)
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/obj/FbxObjectFactory.java