@Override
    public Registration getRegistration(final Class clazz) {
        final Class type = coerceType(clazz);

        if (type == memoizedClass) return memoizedClassValue;
        final Registration registration = classToRegistration.get(type);
        if (registration != null) {
            memoizedClass = type;
            memoizedClassValue = registration;
        }

        return registration;
    }
Called from {@link #getRegistration(Class)} to determine the actual type.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/AbstractGryoClassResolver.java