Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.ConstructorInfo


/*     */   }
/*     */
/*     */   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData)
/*     */     throws Exception
/*     */   {
/* 221 */     ConstructorInfo cinfo = resolveConstructor(trace, info, metaData);
/* 222 */     JoinpointFactory jpf = info.getJoinpointFactory();
/* 223 */     return jpf.getConstructorJoinpoint(cinfo);
/*     */   }
View Full Code Here


/*     */     }
/* 146 */     boolean trace = log.isTraceEnabled();
/* 147 */     if (trace) {
/* 148 */       log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params));
/*     */     }
/* 150 */     ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes);
/* 151 */     ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo);
/* 152 */     joinpoint.setArguments(params);
/* 153 */     return joinpoint;
/*     */   }
View Full Code Here

/*     */
/* 207 */     if ((previous instanceof ParameterMetaData))
/*     */     {
/* 209 */       ParameterMetaData parameter = (ParameterMetaData)previous;
/* 210 */       String[] paramTypes = Configurator.getParameterTypes(false, this.parameters);
/* 211 */       ConstructorInfo ci = Configurator.findConstructorInfo(beanInfo.getClassInfo(), paramTypes);
/* 212 */       return applyCollectionOrMapCheck(ci.getParameterTypes()[parameter.getIndex()]);
/*     */     }
/*     */
/* 218 */     ClassInfo type = beanInfo.getClassInfo();
/* 219 */     this.log.warn("Constructing bean from injection value: results in multiple beans with same class type - " + type);
/* 220 */     return type;
View Full Code Here

/*  80 */         this.colFactory = new ArrayListFactory(null);
/*     */       }
/*     */     }
/*     */     else
/*     */     {
/*  85 */       ConstructorInfo constructor = collectionType.getDeclaredConstructor(null);
/*  86 */       if (constructor == null)
/*     */       {
/*  88 */         for (ConstructorInfo ctor : collectionType.getDeclaredConstructors())
/*     */         {
/*  90 */           if (ctor.getParameterTypes().length != 0)
View Full Code Here

/* 150 */       FieldInfo field = (FieldInfo)FieldInfo.class.cast(member);
/* 151 */       return new FieldSignature(field);
/*     */     }
/* 153 */     if ((member instanceof ConstructorInfo))
/*     */     {
/* 155 */       ConstructorInfo constructor = (ConstructorInfo)ConstructorInfo.class.cast(member);
/* 156 */       return new ConstructorSignature(constructor);
/*     */     }
/* 158 */     throw new IllegalArgumentException("Unknown member: " + member);
/*     */   }
View Full Code Here

/*     */   public ConstructorInfo getDeclaredConstructor(TypeInfo[] parameters)
/*     */   {
/* 233 */     SignatureKey key = new SignatureKey(null, parameters);
/* 234 */     synchronized (this.constructors)
/*     */     {
/* 236 */       ConstructorInfo constructor = (ConstructorInfo)this.constructors.get(key);
/* 237 */       if (constructor != null)
/* 238 */         return constructor;
/*     */     }
/* 240 */     if (this.constructorArray != null)
/* 241 */       return null;
View Full Code Here

/* 153 */     if (this == obj)
/* 154 */       return true;
/* 155 */     if ((obj == null) || (!(obj instanceof ConstructorInfo))) {
/* 156 */       return false;
/*     */     }
/* 158 */     ConstructorInfo other = (ConstructorInfo)obj;
/*     */
/* 160 */     if (!getDeclaringClass().equals(other.getDeclaringClass()))
/* 161 */       return false;
/* 162 */     return Arrays.equals(getParameterTypes(), other.getParameterTypes());
/*     */   }
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

            {
               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

         {
            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

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.