private <T> T |
PodamFactoryImpl.doManufacturePojo(Class<T> pojoClass,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Manufactures and populates the pojo class
|
private void |
PodamFactoryImpl.fillArray(Object array,
String attributeName,
Class<?> elementType,
Type genericElementType,
List<Annotation> annotations,
ManufacturingContext manufacturingCtx) |
It fills an Array with the required number of elements of the required type.
|
private void |
PodamFactoryImpl.fillCollection(ManufacturingContext manufacturingCtx,
List<Annotation> annotations,
String attributeName,
Collection<? super Object> collection,
Class<?> collectionElementType,
Type... genericTypeArgs) |
It fills a collection with the required number of elements of the
required type.
|
private void |
PodamFactoryImpl.fillMap(MapArguments mapArguments,
ManufacturingContext manufacturingCtx) |
It fills a Map with the required number of elements of the required type.
|
private Class<?> |
PodamFactoryImpl.findInheretedCollectionElementType(Collection<Object> collection,
ManufacturingContext manufacturingCtx,
AtomicReference<Type[]> elementGenericTypeArgs,
Type... genericTypeArgs) |
Tries to find collection element type from collection object
|
private MapArguments |
PodamFactoryImpl.findInheretedMapElementType(Map<Object,Object> map,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Finds key and element type arguments
|
private Object |
PodamFactoryImpl.getMapKeyOrElementValue(MapKeyOrElementsArguments keyOrElementsArguments,
ManufacturingContext manufacturingCtx) |
It fills a Map key or value with the appropriate value, considering
attribute-level customisation.
|
private Object[] |
PodamFactoryImpl.getParameterValuesForConstructor(Constructor<?> constructor,
Class<?> pojoClass,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Given a constructor it manufactures and returns the parameter values
required to invoke it
|
private Object[] |
PodamFactoryImpl.getParameterValuesForMethod(Method method,
Class<?> pojoClass,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Given a method it manufactures and returns the parameter values
required to invoke it
|
private <T> T |
PodamFactoryImpl.getValueForAbstractType(Class<T> pojoClass,
AttributeMetadata pojoMetadata,
ManufacturingContext manufacturingCtx,
Type[] genericTypeArgs) |
Returns a value for an abstract type or interface if possible.
|
private <T> T |
PodamFactoryImpl.instantiatePojo(Class<T> pojoClass,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
It creates and returns an instance of the given class if at least one of
its constructors has been annotated with PodamConstructor
|
private <T> T |
PodamFactoryImpl.instantiatePojoWithFactory(Class<?> factoryClass,
Class<T> pojoClass,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
It attempts to create an instance of the given class with a static method
of the factory
|
private Object |
PodamFactoryImpl.manufactureAttributeValue(Object pojo,
ManufacturingContext manufacturingCtx,
Class<?> attributeType,
Type genericAttributeType,
List<Annotation> annotations,
String attributeName,
Type... genericTypeArgs) |
It manufactures and returns the value for a POJO attribute.
|
private Object |
PodamFactoryImpl.manufactureParameterValue(Class<?> pojoClass,
String parameterName,
Class<?> parameterType,
Type genericType,
List<Annotation> annotations,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Manufactures and returns the parameter value for method required to
invoke it
|
private <T> T |
PodamFactoryImpl.manufacturePojoInternal(Class<T> pojoClass,
AttributeMetadata pojoMetadata,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Generic method which returns an instance of the given class filled with
values dictated by the strategy
|
private <T> T |
PodamFactoryImpl.populatePojoInternal(T pojo,
List<Annotation> annotations,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Fills given class filled with values dictated by the strategy
|
private <T> boolean |
PodamFactoryImpl.populateReadOnlyField(T pojo,
ClassAttribute attribute,
ManufacturingContext manufacturingCtx,
Type... genericTypeArgs) |
Fills a field with a getter
|
private <T> boolean |
PodamFactoryImpl.populateReadWriteField(T pojo,
ClassAttribute attribute,
ManufacturingContext manufacturingCtx) |
Fills a field with a setter
|
private Object |
PodamFactoryImpl.resolveArrayElementValue(Object pojo,
ManufacturingContext manufacturingCtx,
AttributeMetadata attributeMetadata) |
It returns an Array with the first element set
|
private Collection<? super Object> |
PodamFactoryImpl.resolveCollectionValueWhenCollectionIsPojoAttribute(Object pojo,
ManufacturingContext manufacturingCtx,
AttributeMetadata attributeMetadata) |
It returns a collection of some sort with some data in it.
|
private Map<? super Object,? super Object> |
PodamFactoryImpl.resolveMapValueWhenMapIsPojoAttribute(Object pojo,
ManufacturingContext manufacturingCtx,
AttributeMetadata attributeMetadata) |
It manufactures and returns a Map with at least one element in it
|
private <T> T |
PodamFactoryImpl.resortToExternalFactory(ManufacturingContext manufacturingCtx,
String msg,
Class<T> pojoClass,
Type... genericTypeArgs) |
Delegates POJO manufacturing to an external factory
|