@Override
   public void visit(Class<?> clazz)
   {

      ClassContextImpl context = new ClassContextImpl(builder, clazz);
      context.put(clazz, payload);

      if (log.isTraceEnabled())
      {
         log.trace("Scanning class: {}", clazz.getName());
      }

      // first process the class
      visit(clazz, context);

      // only process fields and classes if a rule building has been started
      if (context.hasRuleBuildingStarted()) {

         // walk up the inheritance hierarchy
         Class<?> currentType = clazz;
         while (currentType != null) {

            // then process the fields
            for (Field field : currentType.getDeclaredFields())
            {
               visit(field, new FieldContextImpl(context, field));
            }

            // then the methods
            for (Method method : currentType.getDeclaredMethods())
            {
               MethodContextImpl methodContext = new MethodContextImpl(context, method);
               visit(method, methodContext);

               // then the method parameters
               for (int i = 0; i < method.getParameterTypes().length; i++)
               {
                  ParameterImpl parameter = new ParameterImpl(method, method.getParameterTypes()[i],
                           method.getParameterAnnotations()[i], i);
                  visit(parameter, new ParameterContextImpl(methodContext, parameter));
               }
            }

            currentType = currentType.getSuperclass();

         }
      }

   }
@Override
   public void visit(Class<?> clazz)
   {

      ClassContextImpl context = new ClassContextImpl(builder, clazz);
      context.put(clazz, payload);

      if (log.isTraceEnabled())
      {
         log.trace("Scanning class: {}", clazz.getName());
      }

      
      visit(clazz, context);

      
      if (context.hasRuleBuildingStarted()) {

         
         Class<?> currentType = clazz;
         while (currentType != null) {

            
            for (Field field : currentType.getDeclaredFields())
            {
               visit(field, new FieldContextImpl(context, field));
            }

            
            for (Method method : currentType.getDeclaredMethods())
            {
               MethodContextImpl methodContext = new MethodContextImpl(context, method);
               visit(method, methodContext);

               
               for (int i = 0; i < method.getParameterTypes().length; i++)
               {
                  ParameterImpl parameter = new ParameterImpl(method, method.getParameterTypes()[i],
                           method.getParameterAnnotations()[i], i);
                  visit(parameter, new ParameterContextImpl(methodContext, parameter));
               }
            }

            currentType = currentType.getSuperclass();

         }
      }

   }
@ Override public void visit ( Class < ? > clazz ) { ClassContextImpl context = new ClassContextImpl ( builder , clazz ) ; context . put ( clazz , payload ) ; if ( log . isTraceEnabled ( ) ) { log . trace ( "Scanning class: {}" , clazz . getName ( ) ) ; } // first process the class visit ( clazz , context ) ; // only process fields and classes if a rule building has been started if ( context . hasRuleBuildingStarted ( ) ) { // walk up the inheritance hierarchy Class < ? > currentType = clazz ; while ( currentType != null ) { // then process the fields for ( Field field : currentType . getDeclaredFields ( ) ) { visit ( field , new FieldContextImpl ( context , field ) ) ; } // then the methods for ( Method method : currentType . getDeclaredMethods ( ) ) { MethodContextImpl methodContext = new MethodContextImpl ( context , method ) ; visit ( method , methodContext ) ; // then the method parameters for ( int i = 0 ; i < method . getParameterTypes ( ) . length ; i ++ ) { ParameterImpl parameter = new ParameterImpl ( method , method . getParameterTypes ( ) [ i ] , method . getParameterAnnotations ( ) [ i ] , i ) ; visit ( parameter , new ParameterContextImpl ( methodContext , parameter ) ) ; } } currentType = currentType . getSuperclass ( ) ; } } }
Processes the annotation on the supplied class.
Processes the annotation on the supplied class .