public static int getSavedSavableVersion(Object savable,
            Class<? extends Savable> desiredClass, int[] versions, int formatVersion) {
        Class thisClass = savable.getClass();
        int count = 0;

        while (thisClass != desiredClass) {
            thisClass = thisClass.getSuperclass();
            if (thisClass != null && SavableClassUtil.isImplementingSavable(thisClass)) {
                count++;
            } else {
                break;
            }
        }

        if (thisClass == null) {
            throw new IllegalArgumentException(savable.getClass().getName() +
                                               " does not extend " +
                                               desiredClass.getName() + "!");
        } else if (count >= versions.length) {
            if (formatVersion <= 1) {
                return 0; // for buggy versions of j3o
            } else {
                throw new IllegalArgumentException(savable.getClass().getName() +
                                                   " cannot access version of " +
                                                   desiredClass.getName() +
                                                   " because it doesn't implement Savable");
            }
        }
        return versions[count];
    }
A private constructor to inhibit instantiation of this class.
jme3-core/src/main/java/com/jme3/export/SavableClassUtil.java