Package io.github.krandom.api
Interface RandomizerContext
-
- All Implemented Interfaces:
public interface RandomizerContext
A context object for a Randomizer. This interface provides information about the randomization context.
Mahmoud Ben Hassine ([email protected])
-
-
Method Summary
Modifier and Type Method Description abstract Class<out Object>
getTargetType()
Return the target type (parameter of nextObject). abstract Object
getRootObject()
Return the root object being randomized (instance of getTargetType. 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 int
getCurrentRandomizationDepth()
Get the current level in the hierarchy of the object graph. abstract KRandomParameters
getParameters()
Return the currently used parameters by the enclosing KRandom. -
-
Method Detail
-
getTargetType
abstract Class<out Object> getTargetType()
Return the target type (parameter of nextObject).
- Returns:
target type
-
getRootObject
abstract Object getRootObject()
Return the root object being randomized (instance of getTargetType.
- 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 int getCurrentRandomizationDepth()
Get the current level in the hierarchy of the object graph.
- Returns:
current level in the hierarchy of the object graph.
-
getParameters
abstract KRandomParameters getParameters()
Return the currently used parameters by the enclosing KRandom.
- Returns:
currently used parameters
-
-
-
-