Registers the {@link Instant} converter.
@param builder The GSON builder to register the converter with.
@return A reference to {@code builder}.
163802
public static GsonBuilder registerInstant(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(INSTANT_TYPE, new InstantConverter());

    return builder;
  }
704329
public static GsonBuilder registerPeriod(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(PERIOD_TYPE, new PeriodConverter());

    return builder;
  }
797786
@Nonnull
	public static <T> ObjIntConsumer<T> objIntConsumerFrom(Consumer<ObjIntConsumerBuilder<T>> buildingFunction) {
		ObjIntConsumerBuilder builder = new ObjIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1203748
public static @NonNull GsonBuilder populate(final @NonNull GsonBuilder builder) {
    builder
      .registerTypeHierarchyAdapter(Component.class, INSTANCE)
      .registerTypeAdapter(ClickEvent.Action.class, new NameMapSerializer<>("click action", ClickEvent.Action.NAMES))
      .registerTypeAdapter(HoverEvent.Action.class, new NameMapSerializer<>("hover action", HoverEvent.Action.NAMES))
      .registerTypeAdapter(TextColorWrapper.class, new TextColorWrapper.Serializer())
      .registerTypeAdapter(TextColor.class, new NameMapSerializer<>("text color", TextColor.NAMES))
      .registerTypeAdapter(TextDecoration.class, new NameMapSerializer<>("text decoration", TextDecoration.NAMES));
    return builder;
  }
582591
@Nonnull
	public static <T1, T2, R> LBiObjFltFunction<T1, T2, R> biObjFltFunctionFrom(Consumer<LBiObjFltFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjFltFunctionBuilder builder = new LBiObjFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
154403
public <P>JsonModelBuilder<T> add(JsonPropertyBuilderCreator<T> creator1,
			JsonPropertyBuilderCreator<T> creator2) {
		addSub(creator1.<P> get());
		addSub(creator2.<P> get());
		return this;
	}
15726
@Nonnull
	public static <T> ToIntFunction<T> toIntFunctionFrom(Consumer<ToIntFunctionBuilder<T>> buildingFunction) {
		ToIntFunctionBuilder builder = new ToIntFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
508660
public static GsonBuilder registerInterval(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(INTERVAL_TYPE, new IntervalConverter());

    return builder;
  }
627620
@Nonnull
	public static <T1, T2> LBiObjCharPredicate<T1, T2> biObjCharPredicateFrom(Consumer<LBiObjCharPredicateBuilder<T1, T2>> buildingFunction) {
		LBiObjCharPredicateBuilder builder = new LBiObjCharPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
378402
@Override
    public synchronized Builder create(String builderConfigId) throws InvalidBuilderException {
        if (builderConfigId == null || builderConfigId.isEmpty()) {
            String err = Tr.formatMessage(tc, "JWT_BUILDER_INVALID", new Object[] { builderConfigId });
            throw new InvalidBuilderException(err);
        }
        if (!active) {
            String err = Tr.formatMessage(tc, "JWT_BUILDER_NOT_ACTIVE", new Object[] { builderConfigId });
            throw new InvalidBuilderException(err);
        }

        // Tr.error(tc, "JWT_BUILDER_NOT_ACTIVE", new Object[] { builderConfigId
        // });
        // return null;
        return new BuilderImpl(builderConfigId);
    }
701891
public final <S, T> void registerConverter(ConverterKey<S,T> key, Converter<S, T> converter) {	

        if (key.getInputClass() == null) {
            throw new IllegalArgumentException("Input Class must not be null");
        }
        if (key.getOutputClass() == null) {
            throw new IllegalArgumentException("Output Class must not be null");
        }
        if (converter == null) {
            throw new IllegalArgumentException("Converter must not be null");
        }

        if (key.getQualifierAnnotation() == null) {
            throw new IllegalArgumentException("Qualifier must not be null");
        }

        Converter<?,?> old = registeredConverters.putIfAbsent(key, converter);
        if (old != null && (!isSameConverter(old, converter))) {
        	throw new IllegalStateException("Converter already registered for key: " + key);
        }
    }
135699
public <R, W> JSONer register(Converter<R, W> converter, Class<?>... types) {
        for (Class<?> type : checkNotNull(types)) {
            typeConverts.put(type, checkNotNull(converter));
        }
        return this;
    }
699841
@Nonnull
	public static <T> ToIntFunctionBuilder<T> toIntFunction(Consumer<ToIntFunction<T>> consumer) {
		return new ToIntFunctionBuilder(consumer);
	}
378872
private static void registerAllTypeFactories(GsonBuilder gsonBuilder) {
        ServiceLoader<TypeAdapterFactory> loader = ServiceLoader.load(TypeAdapterFactory.class);
        for (TypeAdapterFactory typeFactory : loader) {
            if (logger.isLoggable(Level.FINE)) {
                logger.fine("Add gson type factory: " + typeFactory.getClass().getName());
            }
            gsonBuilder.registerTypeAdapterFactory(typeFactory);
        }
    }
231578
@Nonnull
	public static <T1, T2> LBiObjFltPredicate<T1, T2> biObjFltPredicateFrom(Consumer<LBiObjFltPredicateBuilder<T1, T2>> buildingFunction) {
		LBiObjFltPredicateBuilder builder = new LBiObjFltPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
401752
@Nonnull
	public static LByteIntConsumer byteIntConsumerFrom(Consumer<LByteIntConsumerBuilder> buildingFunction) {
		LByteIntConsumerBuilder builder = new LByteIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1020397
public void addConverterFactory(final IStringConverterFactory converterFactory) {
        addConverterInstanceFactory(new IStringConverterInstanceFactory() {
            @SuppressWarnings("unchecked")
            @Override
            public IStringConverter<?> getConverterInstance(Parameter parameter, Class<?> forType, String optionName) {
                final Class<? extends IStringConverter<?>> converterClass = converterFactory.getConverter(forType);
                try {
                    if(optionName == null) {
                        optionName = parameter.names().length > 0 ? parameter.names()[0] : "[Main class]";
                    }
                    return converterClass != null ? instantiateConverter(optionName, converterClass) : null;
                } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
                    throw new ParameterException(e);
                }
            }
        });
    }