private static Map<String, PropertyDescriptor> getDescriptorMap(Class<?> clazz) throws IntrospectionException {
    Map<String, PropertyDescriptor> descriptorMap = new HashMap<>();

    for (PropertyDescriptor pd : Introspector.getBeanInfo(clazz).getPropertyDescriptors()) {
      String name = pd.getName();
      if (pd.getReadMethod() != null && !name.equals("class")) {
        descriptorMap.put(name, pd);
      }
    }
    return descriptorMap;
  }
Construct a view resource provider for the given resource type and bean class.

@param type            the resource type
@param clazz           the resource bean class
@param pkField         the primary key field name
@param viewDefinition  the associated view definition

@throws IntrospectionException if an exception occurs during introspection of the resource bean class
ambari-server/src/main/java/org/apache/ambari/server/view/ViewSubResourceProvider.java