Package com.gpudb
Class TypeObjectMap.ClassFactory<T>
- java.lang.Object
-
- com.gpudb.TypeObjectMap.ClassFactory<T>
-
- Type Parameters:
T- the class that the factory creates instances of
- All Implemented Interfaces:
TypeObjectMap.Factory<T>
- Enclosing class:
- TypeObjectMap<T>
public static final class TypeObjectMap.ClassFactory<T> extends Object implements TypeObjectMap.Factory<T>
A factory that uses reflection to create new instances of the specified class. The class must have a public, parameterless constructor.
-
-
Constructor Summary
Constructors Constructor Description ClassFactory(Class<?> objectClass)Creates aTypeObjectMap.ClassFactoryfor the specified class.
-
-
-
Constructor Detail
-
ClassFactory
public ClassFactory(Class<?> objectClass)
Creates aTypeObjectMap.ClassFactoryfor the specified class. The class must have a public, parameterless constructor.- Parameters:
objectClass- the class that the factory creates instances of
-
-
Method Detail
-
newInstance
public T newInstance()
Creates a new object instance.- Specified by:
newInstancein interfaceTypeObjectMap.Factory<T>- Returns:
- the new instance
- Throws:
GPUdbRuntimeException- if an instance could not be created
-
-