1 22 package org.jboss.aop.microcontainer.integration; 23 24 import org.jboss.metadata.spi.repository.MetaDataRepository; 25 import org.jboss.metadata.spi.repository.MutableMetaDataRepository; 26 import org.jboss.repository.spi.MetaDataContext; 27 import org.jboss.repository.spi.MetaDataContextFactory; 28 29 34 public class AOPMetaDataContextFactoryDelegate implements MetaDataContextFactory 35 { 36 37 public MetaDataContext getMetaDataContext(ClassLoader beanLoader, MetaDataRepository repository, String beanName) 38 { 39 if (repository instanceof MutableMetaDataRepository) 40 41 { 42 return new AOPMetaDataContext((MutableMetaDataRepository)repository, beanName); 43 } 44 else 45 { 46 throw new RuntimeException ("The passed in repository must be of type org.jboss.metadata.spi.repository.MutableMetaDataRepository"); 47 } 48 } 49 } 50 | Popular Tags |