Interface RandomizerContext

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Class<?> getTargetType() Return the target type (parameter of KRandom.nextObject).
      abstract Object getRootObject() Return the root object being randomized (instance of RandomizerContext.targetType.
      abstract Object getCurrentObject() Return the currently randomized object in the object graph.
      abstract String getCurrentField() Return the full path to the current field being randomized (starting from the first field in the root type).
      abstract Integer getCurrentRandomizationDepth() Get the current level in the hierarchy of the object graph.
      abstract KRandomParameters getParameters() Return the currently used parameters by the enclosing KRandom.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getTargetType

         abstract Class<?> getTargetType()

        Return the target type (parameter of KRandom.nextObject).

        Returns:

        target type

      • getRootObject

         abstract Object getRootObject()

        Return the root object being randomized (instance of RandomizerContext.targetType.

        Returns:

        root object being randomized

      • getCurrentObject

         abstract Object getCurrentObject()

        Return the currently randomized object in the object graph.

        Returns:

        currently randomized object

      • getCurrentField

         abstract String getCurrentField()

        Return the full path to the current field being randomized (starting from the first field in the root type).

        Returns:

        full path to the current field being randomized

      • getCurrentRandomizationDepth

         abstract Integer getCurrentRandomizationDepth()

        Get the current level in the hierarchy of the object graph.

        Returns:

        current level in the hierarchy of the object graph.