public static Map < String , PropertyDescriptor > mapPropertyDescriptors ( Class < ? > clazz ) { PropertyDescriptor [ ] properties = propertyDescriptors ( clazz ) ; Map < String , PropertyDescriptor > mappedProperties = new HashMap < String , PropertyDescriptor > ( ) ; for ( PropertyDescriptor property : properties ) { if ( "class" . equals ( property . getName ( ) ) == false ) { mappedProperties . put ( property . getName ( ) , property ) ; } } return mappedProperties ; }
Reads property descriptors of class and puts them into Map . Key for map is read from property descriptor .