private static List < PropertyDescriptor > getPropertyDescriptorsOptional ( Class < ? > beanClass ) { BeanInfo beanInfo = getBeanInfoOptional ( beanClass ) ; if ( beanInfo == null ) { return Collections . emptyList ( ) ; } PropertyDescriptor propertyDescriptors [ ] = beanInfo . getPropertyDescriptors ( ) ; if ( propertyDescriptors == null ) { return Collections . emptyList ( ) ; } return Collections . unmodifiableList ( new ArrayList < PropertyDescriptor > ( Arrays . asList ( propertyDescriptors ) ) ) ; }
Returns an unmodifiable list containing the PropertyDescriptors of the given bean class . Returns an empty list if either the BeanInfo or the PropertyDescriptors could not be obtained .