Class GuiceObjectMapperProvider


  • @Singleton
    public final class GuiceObjectMapperProvider
    extends java.lang.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 Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.spongepowered.configurate.objectmapping.ObjectMapper.Factory get()
      Get the default factory, with guice support added.
      static org.spongepowered.configurate.objectmapping.FieldDiscoverer<?> injectedObjectDiscoverer​(com.google.inject.Injector injector)
      Create a field discoverer that uses the provided injector.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object