* @return Metamodel instance
* @since Java Persistence 2.0
*/
public Metamodel getMetamodel() {
// perform lazy initialisation
Metamodel tempMetaModel = null;
if(null == metaModel) {
// 338837: verify that the collection is not empty - this would mean entities did not make it into the search path
tempMetaModel = new MetamodelImpl(this);
// If the canonical metamodel classes exist, initialize them
initializeCanonicalMetamodel(tempMetaModel);