Package org.neo4j.ogm.metadata.reflect
Class ReflectionEntityInstantiator
java.lang.Object
org.neo4j.ogm.metadata.reflect.ReflectionEntityInstantiator
- All Implemented Interfaces:
EntityInstantiator
Simple instantiator that uses either the no-arg constructor, without using property values,
or creates an instance with property population.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
createInstance
(Class<T> clazz, Map<String, Object> propertyValues) Creates an instance of a given class.<T> T
createInstanceWithConstructorArgs
(Class<T> clazz, Map<String, Object> propertyValues) Creates an instance of a given class and populates the constructor fields, if needed/possible.
-
Constructor Details
-
ReflectionEntityInstantiator
-
-
Method Details
-
createInstance
Creates an instance of a given class. Ignores the provided propertyValues for compatibility reasons.- Specified by:
createInstance
in interfaceEntityInstantiator
- Type Parameters:
T
- Type to create- Parameters:
clazz
- The class to materialize.propertyValues
- Properties of the object (unused!)- Returns:
- The created instance.
-
createInstanceWithConstructorArgs
Description copied from interface:EntityInstantiator
Creates an instance of a given class and populates the constructor fields, if needed/possible.- Specified by:
createInstanceWithConstructorArgs
in interfaceEntityInstantiator
- Type Parameters:
T
- Type to create- Parameters:
clazz
- The class to maerialize.propertyValues
- Properties of the object (needed for constructors with args)- Returns:
- New instance.
-