Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.ConstructorInfo


         {
            mapFactory = HashMapFactory.INSTANCE;
         }
         else
         {
            ConstructorInfo constructor = classInfo.getDeclaredConstructor(null);
            if (constructor == null)
            {
               for (ConstructorInfo ctor : classInfo.getDeclaredConstructors())
               {
                  if (ctor.getParameterTypes().length == 0)
View Full Code Here


            colFactory = new ArrayListFactory();
         }
      }
      else
      {
         ConstructorInfo constructor = collectionType.getDeclaredConstructor(null);
         if (constructor == null)
         {
            for (ConstructorInfo ctor : collectionType.getDeclaredConstructors())
            {
               if (ctor.getParameterTypes().length == 0)
View Full Code Here

         // 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
View Full Code Here

               result = factory.invoke(null, params);
            }
            else
            {
               String[] signature = getSignature(constructor.getParameters());
               ConstructorInfo constructorInfo = Config.findConstructorInfo(beanInfo.getClassInfo(), signature);
               Object[] params = getParams(constructor.getParameters(), constructorInfo.getParameterTypes());
               result = constructorInfo.newInstance(params);
            }
         }
         else
         {
            result = beanInfo.newInstance();
View Full Code Here

            return joinPoint;
         }
        
         // Find the constructor
         ConstructorJoinpoint joinPoint = findConstructor(trace, info, metaData, beanMetaData);
         ConstructorInfo cinfo = joinPoint.getConstructorInfo();
        
         // Set the parameters
         if (cinfo != null)
         {
            TypeInfo[] pinfos = cinfo.getParameterTypes();
            Object[] params = getParameters(trace, cl, pinfos, metaData.getParameters());
            joinPoint.setArguments(params);
         }
         return joinPoint;
      }
View Full Code Here

    * @return the constructor join point
    * @throws Exception for any error
    */
   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData) throws Exception
   {
      ConstructorInfo cinfo = resolveConstructor(trace, info, metaData);
      JoinpointFactory jpf = info.getJoinpointFactory();
      return jpf.getConstructorJoinpoint(cinfo);
   }
View Full Code Here

         // 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()].getType());
         }
         else
         {
            // currently value constructor supports only values that are instances of class itself
            // this will add another instance with the same class to context
View Full Code Here

      if (this == obj)
         return true;
      if (obj == null || obj instanceof ConstructorInfo == false)
         return false;

      final ConstructorInfo other = (ConstructorInfo) obj;
     
      if (getDeclaringClass().equals(other.getDeclaringClass()) == false)
         return false;
      return (Arrays.equals(getParameterTypes(), other.getParameterTypes()));
   }
View Full Code Here

            {
               if (beanInfo == null)
                  throw new IllegalArgumentException("Missing className: " + this);

               String[] signature = getSignature(constructor.getParameters());
               ConstructorInfo constructorInfo = Config.findConstructorInfo(beanInfo.getClassInfo(), signature);
               Object[] params = getParams(constructor.getParameters(), constructorInfo.getParameterTypes());
               result = constructorInfo.newInstance(params);
            }
         }
         else
         {
            if (beanInfo == null)
View Full Code Here

         FieldInfo field = FieldInfo.class.cast(member);
         return new FieldSignature(field);
      }
      if (member instanceof ConstructorInfo)
      {
         ConstructorInfo constructor = ConstructorInfo.class.cast(member);
         return new ConstructorSignature(constructor);
      }
      throw new IllegalArgumentException("Unknown member: " + member);
   }
View Full Code Here

TOP

Related Classes of org.jboss.reflect.spi.ConstructorInfo

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.