@SuppressWarnings("unchecked")
    public <T> CloneFunction<T> getCloneFunction(Class<T> type) {
        CloneFunction<T> result = functions.get(type);
        if (result == null) {
            // Do a more exhaustive search
            for (Map.Entry<Class, CloneFunction> e : functions.entrySet()) {
                if (e.getKey().isAssignableFrom(type)) {
                    result = e.getValue();
                    break;
                }
            }
            if (result != null) {
                // Cache it for later
                functions.put(type, result);
            }
        }
        return result;
    }
Returns a previously registered clone function for the specified type or null
 if there is no custom clone function for the type.

@param <T> the type of object to be cloned
@param type the type of object to be cloned
@return the registered function, or null if none
jme3-core/src/main/java/com/jme3/util/clone/Cloner.java