Examples of ConstructorInfo


Examples of org.jboss.reflect.spi.ConstructorInfo

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

Examples of org.jboss.reflect.spi.ConstructorInfo

      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

Examples of org.jboss.reflect.spi.ConstructorInfo

   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

Examples of org.jboss.reflect.spi.ConstructorInfo

         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

Examples of org.jboss.reflect.spi.ConstructorInfo

      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

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

Examples of org.jboss.reflect.spi.ConstructorInfo

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

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

Examples of org.jboss.reflect.spi.ConstructorInfo

   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

Examples of org.jboss.reflect.spi.ConstructorInfo

         paramClasses = parameterTypes;
     
      TypeInfo[] paramTypes = new TypeInfo[paramClasses.length];
      for (int i = 0; i < paramClasses.length; ++i)
         paramTypes[i] = factory.getTypeInfo(paramClasses[i]);
      ConstructorInfo constructorInfo = classInfo.getDeclaredConstructor(paramTypes);
      assertNotNull(constructorInfo);
      TypeInfo[] actualParamTypes = constructorInfo.getParameterTypes();
      for (int i = 0; i < paramTypes.length; ++i)
         assertTypeEquals(clazz + " constructorParameter" + i, paramTypes[i], actualParamTypes[i]);
      Class<?>[] exceptionClasses = constructor.getExceptionTypes();
      TypeInfo[] expectedExceptionTypes = new TypeInfo[exceptionClasses.length];
      for (int i = 0; i < exceptionClasses.length; ++i)
         expectedExceptionTypes[i] = factory.getTypeInfo(exceptionClasses[i]);
      TypeInfo[] actualExceptionTypes = constructorInfo.getExceptionTypes();
      for (int i = 0; i < exceptionClasses.length; ++i)
         assertTypeEquals(clazz + " constructorException" + i, expectedExceptionTypes[i], actualExceptionTypes[i]);
      assertEquals(classInfo, constructorInfo.getDeclaringClass());
      assertEquals(constructor.getModifiers(), constructorInfo.getModifiers());
      assertConstructorAnnotations(constructor, constructorInfo);
      assertParameterAnnotations(constructor, constructorInfo);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.