code: public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) {
          BeanInfo beanInfo = null;
          try {
              beanInfo = Introspector.getBeanInfo(clazz);
  
          } catch (IntrospectionException ex) {
              throw new IllegalArgumentException(
                      "Bean introspection failed: " + ex.getMessage());
          }
  
          return beanInfo.getPropertyDescriptors();
      }
docs: Reads property descriptors of class
  
  @param clazz Class for which we are getting property descriptors
  @return Array of Class PropertyDescriptors