code: public static void acceptVisitor(Object bean, JavaBeanVisitor visitor)
     {
  	   
  	   if(bean == null)
  		   return;
  	   
  	   Class<?> beanClass = bean.getClass();
  	   
  	   if(ClassPath.isPrimitive(beanClass))
  	   {
  		   visitor.visitClass(beanClass, bean);
  		   
  		   return; //no properties
  	   }
  	   
   	  PropertyDescriptor descriptors[] = getPropertyDescriptors(bean);
         
         Object value = null;
         for(int i = 0; i < descriptors.length; i++)
         {
                 String name = descriptors[i].getName();
                 if("class".equals(name))
                 {
                          visitor.visitClass((Class<?>)getProperty(bean, name),bean);
                          continue;
                          
                 }
                  
                 if(descriptors[i].getReadMethod() != null)
                 {
                    value = getProperty(bean, name);
                    
                   visitor.visitProperty(name, value,bean);                 
                 }
                   
         }
   	  
     }
docs: *
  Given a given object, use reflection to determine qualities.
  Call the appropriate visitor method to provide the given attributes
  @param bean the object to derive information
  @param visitor object/operation that will be provided the needed information