Package org.jboss.metatype.api.values

Examples of org.jboss.metatype.api.values.InstanceFactory


/*      */     throws Throwable
/*      */   {
/*  808 */     ClassInfo classInfo = beanInfo.getClassInfo();
/*  809 */     if (classInfo.isInterface())
/*      */     {
/*  811 */       InstanceFactory instanceFactory = (InstanceFactory)this.instanceFactoryMap.get(classInfo.getType());
/*  812 */       if (instanceFactory == null) {
/*  813 */         throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);
/*      */       }
/*  815 */       return instanceFactory.instantiate(beanInfo);
/*      */     }
/*  817 */     return beanInfo.newInstance();
/*      */   }
View Full Code Here


   protected Object createNewInstance(BeanInfo beanInfo) throws Throwable
   {
      ClassInfo classInfo = beanInfo.getClassInfo();
      if (classInfo.isInterface())
      {
         InstanceFactory instanceFactory = instanceFactoryMap.get(classInfo.getType());
         if (instanceFactory == null)
            throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);

         return instanceFactory.instantiate(beanInfo);
      }
      return beanInfo.newInstance();
   }
View Full Code Here

TOP

Related Classes of org.jboss.metatype.api.values.InstanceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.