@Override public final List<PropertyDescriptor> getPropertyDescriptors() { final List<PropertyDescriptor> supported = getSupportedPropertyDescriptors(); return supported == null ? Collections.<PropertyDescriptor>emptyList() : new ArrayList<>(supported); }
final List<PropertyDescriptor> supportedDescriptors = getSupportedPropertyDescriptors(); if (null != supportedDescriptors) { for (final PropertyDescriptor descriptor : supportedDescriptors) {
private PropertyDescriptor getPropertyDescriptor(final PropertyDescriptor specDescriptor) { PropertyDescriptor descriptor = null; //check if property supported final List<PropertyDescriptor> supportedDescriptors = getSupportedPropertyDescriptors(); if (supportedDescriptors != null) { for (final PropertyDescriptor desc : supportedDescriptors) { //find actual descriptor if (specDescriptor.equals(desc)) { return desc; } } } descriptor = getSupportedDynamicPropertyDescriptor(specDescriptor.getName()); if (descriptor != null && !descriptor.isDynamic()) { descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(descriptor).dynamic(true).build(); } if (descriptor == null) { descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(specDescriptor).addValidator(Validator.INVALID).dynamic(true).build(); } return descriptor; }