Package org.jboss.beans.metadata.spi

Examples of org.jboss.beans.metadata.spi.ConstructorMetaData


/*    */   public Object endElement(Object o, QName qName, ElementBinding element)
/*    */   {
/* 76 */     AbstractBeanMetaData bean = (AbstractBeanMetaData)o;
/* 77 */     if ((bean.getBean() == null) && (!bean.isAbstract()) && (bean.getParent() == null))
/*    */     {
/* 79 */       ConstructorMetaData constructor = bean.getConstructor();
/* 80 */       if (constructor == null)
/* 81 */         throw new IllegalArgumentException("Bean should have a class attribute or a constructor element.");
/* 82 */       if (constructor.getFactoryMethod() == null)
/*    */       {
/* 84 */         if (constructor.getValue() == null)
/* 85 */           throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have either a factoryMethod attribute or embedded value.");
/*    */       }
/* 87 */       else if ((constructor.getFactory() == null) && (constructor.getFactoryClass() == null))
/* 88 */         throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have one of a factoryClass attribute or a factory element, or embedded value.");
/*    */     }
/* 90 */     return bean;
/*    */   }
View Full Code Here


/* 73 */       if (property == null)
/* 74 */         throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
/* 75 */       ValueMetaData value = property.getValue();
/* 76 */       if (value == null)
/* 77 */         throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
/* 78 */       ConstructorMetaData constructor = (ConstructorMetaData)value.getUnderlyingValue();
/* 79 */       if (constructor == null)
/* 80 */         throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
/* 81 */       if (constructor.getFactoryMethod() == null)
/* 82 */         throw new IllegalArgumentException("BeanFactory should have a class attribute or the constructor element should have a factoryMethod attribute.");
/* 83 */       if ((constructor.getFactory() == null) && (constructor.getFactoryClass() == null))
/* 84 */         throw new IllegalArgumentException("BeanFactory should have a class attribute or the constructor element should have a either a factoryClass attribute or a factory element.");
/*    */     }
/* 86 */     return bean;
/*    */   }
View Full Code Here

         if (property == null)
            throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
         ValueMetaData value = property.getValue();
         if (value == null)
            throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
         ConstructorMetaData constructor = (ConstructorMetaData) value.getUnderlyingValue();
         if (constructor == null)
            throw new IllegalArgumentException("BeanFactory should have a class attribute or a constructor element.");
         if (constructor.getFactoryMethod() == null)
            throw new IllegalArgumentException("BeanFactory should have a class attribute or the constructor element should have a factoryMethod attribute.");
         if (constructor.getFactory() == null && constructor.getFactoryClass() == null)
            throw new IllegalArgumentException("BeanFactory should have a class attribute or the constructor element should have a either a factoryClass attribute or a factory element.");
      }
      return bean;
   }
View Full Code Here

      flushJBossObjectCache();
   }

   public void initialVisit(MetaDataVisitor visitor)
   {
      ConstructorMetaData constructor = getConstructor();
      if (getBean() == null)
      {
         if (isAbstract() == false && getParent() == null)
         {
            if (constructor == null)
               throw new IllegalArgumentException("Bean should have a class attribute or a constructor element.");
            if (constructor.getFactoryMethod() == null)
            {
               if (constructor.getValue() == null)
                  throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have either a factoryMethod attribute or embedded value.");
            }
            else if (constructor.getFactory() == null && constructor.getFactoryClass() == null)
               throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have one of a factoryClass attribute or a factory element, or embedded value.");
         }
      }
      else
      {
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.spi.ConstructorMetaData

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.