package net.sf.esfinge.metadata;

import java.lang.reflect.AnnotatedElement;

import net.sf.esfinge.metadata.container.MetadataRepository;
import net.sf.esfinge.metadata.validate.MetadataValidator;

public class AnnotationReader {
	
	public <E> E readingAnnotationsTo(AnnotatedElement elementWithMetadata, Class<?> outputClass) throws Exception {
		if(elementWithMetadata instanceof Class)
		{
			MetadataValidator.validateMetadataOn((Class)elementWithMetadata);
		}
		MetadataRepository metadataRepository = MetadataRepository.initializeRepository();
		Object container  = metadataRepository.getContainer(outputClass, elementWithMetadata);
		return (E) container;
	}

}

@@ -340,16 +340,48 @@
 ption %7B%0A
+%09%09MetadataRepository.destroy();%0A
 %09%09if(ele

Update AnnotationReader.