Class ValueTranslatorFactory<P,​D>

    • Constructor Detail

      • ValueTranslatorFactory

        public ValueTranslatorFactory()
    • Method Detail

      • create

        public final Translator<P,​D> create​(TypeKey<P> tk,
                                                  CreateContext ctx,
                                                  Path path)
        Description copied from interface: TranslatorFactory
        Create a translator for a type.
        Specified by:
        create in interface TranslatorFactory<P,​D>
        Parameters:
        tk - defines the type which is to be translated
        path - is where this type was discovered, important for logging and exceptions
        Returns:
        null if this factory does not know how to deal with that situation.
      • createValueTranslator

        protected abstract ValueTranslator<P,​D> createValueTranslator​(TypeKey<P> tk,
                                                                            CreateContext ctx,
                                                                            Path path)
        Create a translator, knowing that we have the appropriate type. You don't need to check for type matching.
        Parameters:
        tk - type is guaranteed to erase to something assignable to Class