@SuppressWarnings("unchecked")
    private <T> T readExtension(String name, JsonElement el, T input) throws AssetLoadException, IOException {
        JsonElement extensions = el.getAsJsonObject().getAsJsonObject("extensions");
        if (extensions == null) {
            return input;
        }

        for (Map.Entry<String, JsonElement> ext : extensions.getAsJsonObject().entrySet()) {
            ExtensionLoader loader = null;

            if (key != null) {
                loader = key.getExtensionLoader(ext.getKey());
            }

            if (loader == null) {
                loader = loadedExtensionLoaders.get(ext.getKey());
                if (loader == null) {
                    try {
                        Class<? extends ExtensionLoader> clz = defaultExtensionLoaders.get(ext.getKey());
                        if (clz != null) {
                            loader = clz.getDeclaredConstructor().newInstance();
                        }
                    } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
                        logger.log(Level.WARNING, "Could not instantiate loader", e);
                    }

                    if (loader != null) {
                        loadedExtensionLoaders.put(ext.getKey(), loader);
                    }
                }
            }
            

            if (loader == null) {
                logger.log(Level.WARNING, "Could not find loader for extension " + ext.getKey());
                continue;
            }

            try {
                return (T) loader.handleExtension(gltfLoader, name, el, ext.getValue(), input);
            } catch (ClassCastException e) {
                throw new AssetLoadException("Extension loader " + loader.getClass().getName() + " for extension " + ext.getKey() + " is incompatible with type " + input.getClass(), e);
            }
        }

        return input;
    }
Returns the default extras loader.
@return the default extras loader.
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/CustomContentManager.java