public static Object instantiate ( MetadataBase metadata ) { try { return metadata . getConstructorMetadata ( ) . getConstructorMethodHandle ( ) . invoke ( ) ; } catch ( Throwable t ) { throw new EntityManagerException ( t ) ; } }
Creates and returns a new instance of a persistence class for the given metadata . The returned object will be an instance of the primary persistence class or its Builder .