private static void tryAddDynamicType(final List<TypeRegistration<?>> types, final String type,
                                            final String serializer, final int registrationId) {
        try {
            final Class typeClass = Class.forName(type);
            final Optional<SerializerShim<?>> serializerInstance = Optional.ofNullable(serializer)
                    .map(FunctionUtils.wrapFunction(Class::forName))
                    .map(FunctionUtils.wrapFunction(c -> (SerializerShim<?>) c.getConstructor().newInstance()));
            if (serializerInstance.isPresent()) {
                types.add(GryoTypeReg.of(typeClass, registrationId, serializerInstance.get()));
            } else {
                types.add(GryoTypeReg.of(typeClass, registrationId));
            }
        } catch (Exception ignored) {
            // if the class isn't here - no worries
        }
    }
Creates a new {@link GryoVersion}.

@param versionNumber the user facing string representation of the version which should follow an {@code x.y}
                     pattern
@param registrations the list of registrations for this version
@param classResolverMaker providers the default {@code ClassResolver} for a particular version of Gryo
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java