Package org.jboss.beans.metadata.spi

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


   public Object endElement(Object o, QName qName, ElementBinding element)
   {
      AbstractBeanMetaData bean = (AbstractBeanMetaData) o;
      if (bean.getBean() == null)
      {
         ConstructorMetaData constructor = bean.getConstructor();
         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.");
      }
      return bean;
   }
View Full Code Here


   public void initialVisit(MetaDataVisitor visitor)
   {
      if (getBean() == null && isAbstract() == false && getParent() == null)
      {
         ConstructorMetaData constructor = getConstructor();
         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.");
      }

      KernelControllerContext ctx = visitor.getControllerContext();
      if (ctx.getBeanMetaData() == this)
View Full Code Here

   public Object endElement(Object o, QName qName, ElementBinding element)
   {
      AbstractBeanMetaData bean = (AbstractBeanMetaData) o;
      if (bean.getBean() == null && bean.isAbstract() == false && bean.getParent() == null)
      {
         ConstructorMetaData constructor = bean.getConstructor();
         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.");
      }
      return bean;
   }
View Full Code Here

   public Object endElement(Object o, QName qName, ElementBinding element)
   {
      AbstractBeanMetaData bean = (AbstractBeanMetaData) o;
      if (bean.getBean() == null && bean.isAbstract() == false && bean.getParent() == null)
      {
         ConstructorMetaData constructor = bean.getConstructor();
         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.");
      }
      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

   public List<BeanMetaData> getBeans()
   {
      if (getBean() == null)
      {
         ConstructorMetaData constructor = getConstructor();
         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.");
      }

      if (getFactoryClass() == null)
         setFactoryClass(GenericBeanFactory.class.getName());
View Full Code Here

   {
      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Instantiating info=" + info + " metaData=" + metaData);

      ConstructorMetaData constructor = null;
      if (metaData != null)
         constructor = metaData.getConstructor();
      Joinpoint joinPoint = getConstructorJoinPoint(config, info, constructor, metaData);
      return joinPoint.dispatch();
   }
View Full Code Here

   public void initialVisit(MetaDataVisitor visitor)
   {
      if (getBean() == null && isAbstract() == false && getParent() == null)
      {
         ConstructorMetaData constructor = getConstructor();
         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.");
      }

      KernelControllerContext ctx = visitor.getControllerContext();
      if (ctx.getBeanMetaData() == this)
View Full Code Here

   }

   public Object endElement(Object object, QName qName, ElementBinding elementBinding)
   {
      AbstractBeanMetaData beanMetaData = (AbstractBeanMetaData) object;
      ConstructorMetaData constructor = beanMetaData.getConstructor();
      if (constructor != null)
      {
         List<ParameterMetaData> parameters = constructor.getParameters();
         if (parameters != null && parameters.size() > 1)
         {
            orderParameters(parameters);
         }
      }
View Full Code Here

/*     */   {
/*  84 */     boolean trace = log.isTraceEnabled();
/*  85 */     if (trace) {
/*  86 */       log.trace("Instantiating info=" + info + " metaData=" + metaData);
/*     */     }
/*  88 */     ConstructorMetaData constructor = null;
/*  89 */     if (metaData != null)
/*  90 */       constructor = metaData.getConstructor();
/*  91 */     Joinpoint joinPoint = getConstructorJoinPoint(config, info, constructor, metaData);
/*  92 */     return joinPoint.dispatch();
/*     */   }
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.