Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.MethodInfo.invoke()


            m.setAccessible(true);
         }
         else
            throw new IllegalArgumentException("Cannot set accessible on method info: " + mi);
      }
      mi.invoke(null, new Object[]{value});
   }

   public void injectToField(Class<?> clazz, String name, Object value) throws Throwable
   {
      ClassInfo classInfo = configurator.getClassInfo(clazz);
View Full Code Here


                  factoryBeanInfo = configuration.getBeanInfo(factoryClass, cl);
              
               String[] signature = getSignature(constructor.getParameters());
               MethodInfo factory = Config.findMethodInfo(factoryBeanInfo.getClassInfo(), factoryMethod, signature, true, true);
               Object[] params = getParams(constructor.getParameters(), factory.getParameterTypes());
               result = factory.invoke(null, params);
            }
            else
            {
               String[] signature = getSignature(constructor.getParameters());
               ConstructorInfo constructorInfo = Config.findConstructorInfo(beanInfo.getClassInfo(), signature);
View Full Code Here

            try
            {
               PropertyInfo info = getProperty(parentValue, property);
               value = convertValue(info, prop.getType(), value);
               method = info.getSetter();
               method.invoke(parentValue, new Object[] { value });
            }
            catch (RuntimeException e)
            {
               throw e;
            }
View Full Code Here

                  throw new IllegalArgumentException("Missing className or factoryClass: " + this);

               String[] signature = getSignature(constructor.getParameters());
               MethodInfo factory = Config.findMethodInfo(factoryBeanInfo.getClassInfo(), factoryMethod, signature, true, true);
               Object[] params = getParams(constructor.getParameters(), factory.getParameterTypes());
               result = factory.invoke(null, params);
            }
            else
            {
               if (beanInfo == null)
                  throw new IllegalArgumentException("Missing className: " + this);
View Full Code Here

                  throw new IllegalArgumentException("Missing className or factoryClass: " + this);

               String[] signature = getSignature(constructor.getParameters());
               MethodInfo factory = Config.findMethodInfo(factoryBeanInfo.getClassInfo(), factoryMethod, signature, true, true);
               Object[] params = getParams(constructor.getParameters(), factory.getParameterTypes());
               result = factory.invoke(null, params);
            }
            else
            {
               if (beanInfo == null)
                  throw new IllegalArgumentException("Missing className: " + this);
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.