Package org.jboss.beans.info.spi

Examples of org.jboss.beans.info.spi.BeanInfo


            // Get the parameters
            List<ParameterMetaData> parameters = metaData.getParameters();

            // Describe the factory
            BeanInfo factoryInfo = config.getBeanInfo(factory.getClass());

            // Find the method
            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, false, true);
            joinPoint.setTarget(factory);
            MethodInfo minfo = joinPoint.getMethodInfo();

            // Set the parameters
            if (minfo != null)
            {
               TypeInfo[] pinfos = minfo.getParameterTypes();
               Object[] params = getParameters(trace, cl, pinfos, parameters);
               joinPoint.setArguments(params);
            }
            return joinPoint;
         }

         String factoryClassName = metaData.getFactoryClass();
         if (factoryClassName != null)
         {
            // Get the parameters
            List<ParameterMetaData> parameters = metaData.getParameters();

            BeanInfo factoryInfo = config.getBeanInfo(factoryClassName, cl);

            // Find the method
            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, true, true);
            MethodInfo minfo = joinPoint.getMethodInfo();
View Full Code Here


      Set<PropertyMetaData> properties = beanMetaData.getProperties();

      if (properties == null || properties.size() == 0)
         return;

      BeanInfo beanInfo = context.getBeanInfo();
      if (beanInfo == null)
         return;

      ClassLoader cl;
      try
View Full Code Here

         super(fromString, ControllerState.INSTANTIATED);
      }

      public BeanInfo internalExecute(ControllerContext context)
      {
         BeanInfo info = ((KernelControllerContext)context).getBeanInfo();
         return info != null ? new UnmodifiableBeanInfo(info) : null;
      }
View Full Code Here

      return getConstructorJoinPoint(info, null, null);
   }

   public Joinpoint getConstructorJoinPoint(BeanMetaData metaData) throws Throwable
   {
      BeanInfo info = getBeanInfo(metaData);
      return getConstructorJoinPoint(info, metaData.getConstructor(), metaData);
   }
View Full Code Here

      if (isAttributePresent(className) == false)
         throw new IllegalArgumentException("Javabean class must be set: " + annotation);

      try
      {
         BeanInfo beanInfo = configuration.getBeanInfo(className.getName(), null);
         return new AbstractValueMetaData(beanInfo.newInstance());
      }
      catch (Throwable t)
      {
         throw new IllegalArgumentException("Exception while creating javabean: " + t);
      }
View Full Code Here

         return applyCollectionOrMapCheck(methodInfo.getParameterTypes()[parameter.getIndex()]);
      }
      else
      {
         KernelControllerContext context = visitor.getControllerContext();
         BeanInfo beanInfo = context.getBeanInfo();
         // find matching parameter
         if (previous instanceof ParameterMetaData)
         {
            ParameterMetaData parameter = (ParameterMetaData) previous;
            String[] paramTypes = Configurator.getParameterTypes(false, parameters);
            ConstructorInfo ci = Configurator.findConstructorInfo(beanInfo.getClassInfo(), paramTypes);
            return applyCollectionOrMapCheck(ci.getParameterTypes()[parameter.getIndex()]);
         }
         else
         {
            // currently value constructor supports only values that are instances of class itself
            // this will add another instance with the same class to context
            ClassInfo type = beanInfo.getClassInfo();
            log.debug("Constructing bean from injection value: results in multiple beans with same class type - " + type);
            return type;
         }
      }
   }
View Full Code Here

public class DescribeAction extends AnnotationsAction
{
   @SuppressWarnings("unchecked")
   protected void installActionInternal(KernelControllerContext context) throws Throwable
   {
      BeanInfo info = context.getBeanInfo();
      if (info != null)
      {
         KernelController controller = (KernelController)context.getController();
         KernelConfig config = controller.getKernel().getConfig();
         DependencyBuilder dependencyBuilder = config.getDependencyBuilder();
View Full Code Here

      }
   }

   protected void uninstallActionInternal(KernelControllerContext context)
   {
      BeanInfo info = context.getBeanInfo();
      if (info != null)
      {
         // handle custom annotations
         cleanAnnotations(context);
View Full Code Here

    * @throws Throwable for any error
    */
   protected KernelRegistryEntry createKernelRegistryEntry(Kernel kernel, Object object) throws Throwable
   {
      KernelConfig config = kernel.getConfig();
      BeanInfo info = config.getBeanInfo(object.getClass());
      return new BeanKernelRegistryEntry(object, info);
   }
View Full Code Here

      KernelControllerContext context = visitor.getControllerContext();
      Kernel kernel = context.getKernel();
      KernelMetaDataRepository repository = kernel.getMetaDataRepository();
      MetaData retrieval = repository.getMetaData(context);
      BeanInfo info = context.getBeanInfo();

      handleAnnotations(info, retrieval, visitor, isApplyPhase);
   }
View Full Code Here

TOP

Related Classes of org.jboss.beans.info.spi.BeanInfo

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.