public static interface UtlObjectGraph.PopulationHelper
| Modifier and Type | Method and Description |
|---|---|
Collection<?> |
getFactoryObjects()
Returns a collection of factory objects to help in creating new Objects.
|
Object |
getNewInstance(Class<?> type,
Stack<String> getterStack,
Random random)
Allows the helper to provide a new object instance that is perhaps more customized than that provided
by the random populator.
|
Class<?>[] |
getTypeParameters(Object o,
Class<?> parameterizedType,
Stack<String> getterStack)
Used to retrieve the concrete types for initializing a class with
|
boolean |
shouldPopulate(Class<?> type,
Stack<String> getterStack,
Random random)
Called by the populator to test whether a field at the given stack should be populated.
|
Collection<?> getFactoryObjects()
Class<?>[] getTypeParameters(Object o, Class<?> parameterizedType, Stack<String> getterStack)
o - The generic object being populated.parameterizedType - the parameterized type whose types need to be resolvedgetterStack - The location in the stack from the root object being intialized.boolean shouldPopulate(Class<?> type, Stack<String> getterStack, Random random)
type - The type of the field.getterStack - The field's path.random - An instanct of random to allow for predictable randomization.Object getNewInstance(Class<?> type, Stack<String> getterStack, Random random)
type - The object type to create.getterStack - The stack representing the accessor method from the root object to the getter.random - A random seeded for use in population.Copyright © 2019 Neeve Research, LLC. All Rights Reserved.