Class GuiceObjectMapperProvider


  • @Singleton
    public final class GuiceObjectMapperProvider
    extends Object
    A factory for ObjectMappers that will inherit the injector from wherever it is provided.

    This class is intended to be constructed through Guice dependency injection.

    Since:
    4.0.0
    • Method Detail

      • get

        public org.spongepowered.configurate.objectmapping.ObjectMapper.Factory get()
        Get the default factory, with guice support added.
        Returns:
        the default guice factory
        Since:
        4.0.0
      • injectedObjectDiscoverer

        public static org.spongepowered.configurate.objectmapping.FieldDiscoverer<?> injectedObjectDiscoverer​(com.google.inject.Injector injector)
        Create a field discoverer that uses the provided injector.
        Parameters:
        injector - injector to create instances with
        Returns:
        new discoverer
        Since:
        4.0.0