code: public void init(final SerializedDataTypeRegistry typeRegistry, final DeserializerRegistry deserRegistry,
              final SerializerRegistry serRegistry) {
          if (initialized) {
              throw new IllegalStateException("Instance already initialized - Don't call the init methods more than once");
          }
          this.typeRegistry = typeRegistry;
          for (final JsonbDeserializer<?> deserializer : deserializers) {
              if (deserializer instanceof DeserializerRegistryRequired) {
                  if (deserRegistry == null) {
                      throw new IllegalStateException(
                              "There is at least one deserializer that requires a 'DeserializerRegistry', but you didn't provide one (deserializer="
                                      + deserializer.getClass().getName() + ")");
                  }
                  final DeserializerRegistryRequired des = (DeserializerRegistryRequired) deserializer;
                  des.setRegistry(deserRegistry);
              }
              if (deserializer instanceof SerializedDataTypeRegistryRequired) {
                  if (typeRegistry == null) {
                      throw new IllegalStateException(
                              "There is at least one deserializer that requires a 'SerializedDataTypeRegistry', but you didn't provide one (deserializer="
                                      + deserializer.getClass().getName() + ")");
                  }
                  final SerializedDataTypeRegistryRequired des = (SerializedDataTypeRegistryRequired) deserializer;
                  des.setRegistry(typeRegistry);
              }
          }
          for (final JsonbSerializer<?> serializer : serializers) {
              if (serializer instanceof SerializerRegistryRequired) {
                  if (serRegistry == null) {
                      throw new IllegalStateException(
                              "There is at least one serializer that requires a 'SerializerRegistry', but you didn't provide one (serializer="
                                      + serializer.getClass().getName() + ")");
                  }
                  final SerializerRegistryRequired ser = (SerializerRegistryRequired) serializer;
                  ser.setRegistry(serRegistry);
              }
              if (serializer instanceof SerializedDataTypeRegistryRequired) {
                  if (typeRegistry == null) {
                      throw new IllegalStateException(
                              "There is at least one serializer that requires a 'SerializedDataTypeRegistry', but you didn't provide one (serializer="
                                      + serializer.getClass().getName() + ")");
                  }
                  final SerializedDataTypeRegistryRequired ser = (SerializedDataTypeRegistryRequired) serializer;
                  ser.setRegistry(typeRegistry);
              }
          }
          initialized = true;
      }
docs: Initializes the instance with necessary registries.
  
  @param typeRegistry
  Mapping from type name to type class.
  @param deserRegistry
  Mapping from type name to deserializers.
  @param serRegistry
  Mapping from type name to serializers.