Class ObjenesisObjectFactory

  • All Implemented Interfaces:
    io.github.krandom.api.ObjectFactory

    
    public class ObjenesisObjectFactory
     implements ObjectFactory
                        

    Objenesis based factory to create "fancy" objects: immutable java beans, generic types, abstract and interface types.

    Author:

    Mahmoud Ben Hassine ([email protected])

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T> T createInstance(@NotNull() Class<T> type, @NotNull() RandomizerContext context) Create a new instance of type in the given randomization context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjenesisObjectFactory

        ObjenesisObjectFactory()
    • Method Detail

      • createInstance

         <T> T createInstance(@NotNull() Class<T> type, @NotNull() RandomizerContext context)

        Create a new instance of type in the given randomization context.

        Parameters:
        type - to create
        context - current randomization context
        Returns:

        new instance of the given type