Class GeneratorProxy<E>

    • Field Detail

      • generatedType

        protected java.lang.Class<E> generatedType
        The Generated type.
    • Constructor Detail

      • GeneratorProxy

        public GeneratorProxy​(java.lang.Class<E> generatedType)
        Instantiates a new Generator proxy.
        Parameters:
        generatedType - the generated type
      • GeneratorProxy

        public GeneratorProxy​(Generator<E> source)
        Instantiates a new Generator proxy.
        Parameters:
        source - the source
    • Method Detail

      • getGeneratedType

        public java.lang.Class<E> getGeneratedType()
        Description copied from interface: Generator
        Declares the type of the objects returned by the generate() method.
        Returns:
        the generated type
      • generate

        public ProductWrapper<E> generate​(ProductWrapper<E> wrapper)
        Description copied from interface: Generator
        Returns an instance of the generic type E, using the ProductWrapper instance provided as argument. The wrapper may wrap a null value as a regular generator product. If the generator is not available (any more), it returns null instead of the ProductWrapper instance.
        Parameters:
        wrapper - the wrapper
        Returns:
        the product wrapper