com.neeve.util
Interface UtlObjectGraph.PopulationHelper

Enclosing class:
UtlObjectGraph

public static interface UtlObjectGraph.PopulationHelper

A helper interface to assist in object population.


Method Summary
 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
 

Method Detail

getFactoryObjects

Collection<?> getFactoryObjects()
Returns a collection of factory objects to help in creating new Objects. The population methods will search for methods of the form create() methods to assist in insantiating new types.

Returns:
A set of facorties for creating objects to populate fields in the graph being populated.

getTypeParameters

Class<?>[] getTypeParameters(Object o,
                             Class<?> parameterizedType,
                             Stack<String> getterStack)
Used to retrieve the concrete types for initializing a class with

Parameters:
o - The generic object being populated.
parameterizedType - the parameterized type whose types need to be resolved
getterStack - The location in the stack from the root object being intialized.
Returns:
A helper for determining the generic type of a collection field in the graph.

getNewInstance

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. The populator will still further populate the returned type with random data if it is:


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.