Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.MethodInfo


      catch (IllegalArgumentException good) {}
   }

   public void testOneParamToTwoParams()
   {
      MethodInfo mi = new MockMethodInfo(METHOD, new TypeInfo[] { INTEGER_TYPE });
      allMethods.add(mi);
     
      ServiceValueFactoryParameterMetaData one = new ServiceValueFactoryParameterMetaData(ONE, INTEGER);
      ServiceValueFactoryParameterMetaData two = new ServiceValueFactoryParameterMetaData(TWO, INTEGER);
     
View Full Code Here


      catch (IllegalArgumentException good) {}
   }
  
   public void testDoubleMatch()
   {
      MethodInfo mi = new MockMethodInfo(METHOD, new TypeInfo[]{ INTEGER_TYPE, LONG_TYPE } );
      allMethods.add(mi);
      mi = new MockMethodInfo(METHOD, new TypeInfo[]{ INTEGER_TYPE, STRING_TYPE } );
      allMethods.add(mi);
     
      ServiceValueFactoryParameterMetaData one = new ServiceValueFactoryParameterMetaData(ONE, null);
View Full Code Here

      if (propertyAnnotations == null || propertyAnnotations.size() == 0)
         return;

      PropertyInfo propertyInfo = beanInfo.getProperty(propertyMetaData.getName());
      // method annotations
      MethodInfo methodInfo = propertyInfo.getGetter();
      if (methodInfo != null)
         updateAnnotations(repository, classloader, mutable, context, methodInfo, propertyAnnotations, add);
      methodInfo = propertyInfo.getSetter();
      if (methodInfo != null)
         updateAnnotations(repository, classloader, mutable, context, methodInfo, propertyAnnotations, add);
View Full Code Here

      for (Iterator it = reflectInfoMethods.keySet().iterator() ; it.hasNext() ; )
      {
         Long hash = (Long)it.next();
         CtMethod ctmethod = (CtMethod)javassistMethods.get(hash);
         MethodInfo methodInfo = (MethodInfo)reflectInfoMethods.get(hash);
         compareMethods(methodInfo, ctmethod);

         MethodInfo methodInfo2 = (MethodInfo)javassistInfoMethods.get(hash);
         compareMethods(methodInfo, methodInfo2);

         Method method = MethodHashing.findMethodByHash(clazz, hash.longValue());
         assertNotNull(method);
         compareMethods(methodInfo, method);
View Full Code Here

      for (Iterator it = reflectInfoMethods.keySet().iterator() ; it.hasNext() ; )
      {
         Long hash = (Long)it.next();
         CtMethod ctmethod = (CtMethod)javassistMethods.get(hash);
         MethodInfo methodInfo = (MethodInfo)reflectInfoMethods.get(hash);
         compareMethods(methodInfo, ctmethod);

         MethodInfo methodInfo2 = (MethodInfo)javassistInfoMethods.get(hash);
         compareMethods(methodInfo, methodInfo2);

         Method method = MethodHashing.findMethodByHash(clazz, hash.longValue());
         assertNotNull(method);
         compareMethods(methodInfo, method);
View Full Code Here

            BeanInfo factoryInfo = config.getBeanInfo(factory.getClass());

            // Find the method
            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, false, true);
            joinPoint.setTarget(factory);
            MethodInfo minfo = joinPoint.getMethodInfo();

            // Set the parameters
            if (minfo != null)
            {
               TypeInfo[] pinfos = minfo.getParameterTypes();
               Object[] params = getParameters(trace, cl, pinfos, parameters);
               joinPoint.setArguments(params);
            }
            return joinPoint;
         }

         String factoryClassName = metaData.getFactoryClass();
         if (factoryClassName != null)
         {
            // Get the parameters
            List<ParameterMetaData> parameters = metaData.getParameters();

            BeanInfo factoryInfo = config.getBeanInfo(factoryClassName, cl);

            // Find the method
            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, true, true);
            MethodInfo minfo = joinPoint.getMethodInfo();

            // Set the parameters
            if (minfo != null)
            {
               TypeInfo[] pinfos = minfo.getParameterTypes();
               Object[] params = getParameters(trace, cl, pinfos, parameters);
               joinPoint.setArguments(params);
            }
            return joinPoint;
         }
View Full Code Here

         throw new IllegalArgumentException("Null bean info");
      if (name == null)
         throw new IllegalArgumentException("Null name");

      String[] paramTypes = getParameterTypes(trace, parameters);
      MethodInfo minfo = findMethodInfo(info.getClassInfo(), name, paramTypes, isStatic, isPublic);
      JoinpointFactory jpf = info.getJoinpointFactory();
      MethodJoinpoint joinPoint = jpf.getMethodJoinpoint(minfo);

      // Set the parameters
      if (minfo != null)
      {
         TypeInfo[] pinfos = minfo.getParameterTypes();
         Object[] params = getParameters(trace, cl, pinfos, parameters);
         joinPoint.setArguments(params);
      }

      return joinPoint;
View Full Code Here

     
      ParameterMetaData parameter = (ParameterMetaData) previous;
      KernelControllerContext context = visitor.getControllerContext();
      String method = (methodName != null ? methodName : type);
      String[] parameterTypes = Configurator.getParameterTypes(false, parameters);
      MethodInfo methodInfo = Configurator.findMethodInfo(getClassInfo(context), method, parameterTypes);
      return applyCollectionOrMapCheck(methodInfo.getParameterTypes()[parameter.getIndex()]);
   }
View Full Code Here

      Map methodMap = ClassInfoMethodHashing.getMethodMap(classInfo);
      if (methodMap != null)
      {
         for (Iterator it = methodMap.values().iterator() ; it.hasNext() ; )
         {
            MethodInfo method = (MethodInfo)it.next();
            if (Advisable.isAdvisableMethod(method.getModifiers(), method.getName()))
            {
               HashMap<String, ArrayList<String>> classMap = new LinkedHashMap<String, ArrayList<String>>();
               getRealMethodAnnotationDependencies(method, classMap);
               HashMap<String, ArrayList<String>> overrideMap = new LinkedHashMap<String, ArrayList<String>>();
               getMetaDataMethodAnnotationDependencies(method, metaData, overrideMap);
View Full Code Here

   protected void validateMethodValues(String name, String[] signature, Object[] paramaters) throws Throwable
   {
      BeanValidatorBridge bridge = KernelControllerContextAction.getBeanValidatorBridge(this);
      if (bridge != null)
      {
         MethodInfo methodInfo = Configurator.findMethodInfo(getInfo().getClassInfo(), name, signature);
         bridge.validateMethodValues(this, getTarget(), methodInfo, paramaters);
      }
   }
View Full Code Here

TOP

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

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.