Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.ConstructorInfo


      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params));

      ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes);
      ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo);
      joinpoint.setArguments(params);
      return joinpoint;
   }
View Full Code Here


   public ConstructorInfo getDeclaredConstructor(TypeInfo[] parameters)
   {
      SignatureKey key = new SignatureKey(null, parameters);
      synchronized (constructors)
      {
         ConstructorInfo constructor = constructors.get(key);
         if (constructor != null)
            return constructor;
      }
      if (constructorArray != null)
         return null;
View Full Code Here

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

      final ConstructorInfo other = (ConstructorInfo) obj;
     
      if (declaringClass.equals(other.getDeclaringClass()) == false)
         return false;
      return (Arrays.equals(parameterTypes, other.getParameterTypes()));
   }
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

         // 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

      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params));

      ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes);
      ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo);
      joinpoint.setArguments(params);
      return joinpoint;
   }
View Full Code Here

     
      try
      {
         TypeInfoFactory factory = classInfo.getTypeInfoFactory();
         ClassInfo mapperClass = (ClassInfo) factory.getTypeInfo(mapping.value());
         ConstructorInfo constructor = mapperClass.getDeclaredConstructor(null);
         mapper = (MetaMapper<?>) constructor.newInstance(null);
         typeInfo.setAttachment(MetaMapper.class.getName(), mapper);
         return mapper;
      }
      catch (Error e)
      {
View Full Code Here

   public ConstructorInfo getDeclaredConstructor(TypeInfo[] parameters)
   {
      SignatureKey key = new SignatureKey(null, parameters);
      synchronized (constructors)
      {
         ConstructorInfo constructor = constructors.get(key);
         if (constructor != null)
            return constructor;
      }
      if (constructorArray != null)
         return null;
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

/*     */         }
/* 175 */         return joinPoint;
/*     */       }
/*     */
/* 179 */       ConstructorJoinpoint joinPoint = findConstructor(trace, info, metaData);
/* 180 */       ConstructorInfo cinfo = joinPoint.getConstructorInfo();
/*     */
/* 183 */       if (cinfo != null)
/*     */       {
/* 185 */         TypeInfo[] pinfos = cinfo.getParameterTypes();
/* 186 */         Object[] params = getParameters(trace, cl, pinfos, metaData.getParameters());
/* 187 */         joinPoint.setArguments(params);
/*     */       }
/* 189 */       return joinPoint;
/*     */     }
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.