code: public static PropertyDescriptor getProperty(Class<?> clazz, String propertyName, Class<?> propertyType) {
          if (clazz == null || propertyName == null || propertyType == null) {
              return null;
          }
  
          try {
              PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(clazz, propertyName);
              if (pd != null && pd.getPropertyType().equals(propertyType)) {
                  return pd;
              }
              return null;
          }
          catch (Exception e) {
              // if there are any errors in instantiating just return null for the moment
              return null;
          }
      }
docs: Retrieves a property of the given class of the specified name and type
  @param clazz The class to retrieve the property from
  @param propertyName The name of the property
  @param propertyType The type of the property
  
  @return A PropertyDescriptor instance or null if none exists