Class ObjenesisObjectFactory

  • All Implemented Interfaces:
    ObjectFactory

    public class ObjenesisObjectFactory
    extends java.lang.Object
    implements ObjectFactory
    Objenesis based factory to create "fancy" objects: immutable java beans, generic types, abstract and interface types.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T createInstance​(java.lang.Class<T> type, 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

        public ObjenesisObjectFactory()
    • Method Detail

      • createInstance

        public <T> T createInstance​(java.lang.Class<T> type,
                                    RandomizerContext context)
        Description copied from interface: ObjectFactory
        Create a new instance of type in the given randomization context.
        Specified by:
        createInstance in interface ObjectFactory
        Type Parameters:
        T - generic type
        Parameters:
        type - to create
        context - current randomization context
        Returns:
        new instance of the given type