code: private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException
     {
        BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass());
        PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
  
        for (int i = 0; i < propertyDescriptors.length; i++)
        {
           PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
           if (propertyDescriptor.getPropertyType() != null)
           {
              String name = propertyDescriptor.getName();
              Method readMethod = propertyDescriptor.getReadMethod();
              Method writeMethod = propertyDescriptor.getWriteMethod();
  
              String readMethodName = readMethod == null ? null : readMethod.getName();
              String writeMethodName = writeMethod == null ? null : writeMethod.getName();
              addProperty(writer, name, propertyDescriptor.getPropertyType(), readMethodName, writeMethodName);
  
              if (readMethod != null)
              {
                 methodSet.add(readMethod);
              }
  
              if (writeMethod != null)
              {
                 methodSet.add(writeMethod);
              }
           }
           else
           {
              processAmbiguousProperty(writer, methodSet, aClass, propertyDescriptor);
           }
        }
     }
docs: Process class properties.
  
  @param writer output stream
  @param methodSet set of methods processed
  @param aClass class being processed
  @throws IntrospectionException
  @throws XMLStreamException