Class CreateContext


  • public class CreateContext
    extends Object
    The context while creating translator factories. Tracks important state as we navigate the class graph.
    Author:
    Jeff Schnitzer
    • Constructor Detail

      • CreateContext

        public CreateContext()
    • Method Detail

      • getTranslator

        public <P,​D> Translator<P,​D> getTranslator​(TypeKey<P> tk,
                                                               CreateContext ctx,
                                                               Path path)
        Get the relevant translator, creating it if necessary.
      • getPopulator

        public <P> Populator<P> getPopulator​(Class<P> clazz,
                                             Path path)
        Get the populator for the specified class. This requires looking up the translator for that class and then getting the populator from it.
        Parameters:
        clazz - is the class we want a populator for.