Source:
private void setCommonProperties(DefaultPropertyDescriptor desc, Map<Class, Annotation> annotations) { desc.setMandatory(annotations.get(PropertyMandatory.class) != null); desc.setDeprecated(annotations.get(Deprecated.class) != null); desc.setAdvanced(annotations.get(PropertyAdvanced.class) != null); PropertyGroup parameterGroup = (PropertyGroup) annotations.get(PropertyGroup.class); PropertyGroupDescriptor group = this.groups.get(parameterGroup); if (group == null && parameterGroup != null) { group = new PropertyGroupDescriptor(Arrays.asList(parameterGroup.value())); } else if (group == null) { group = new PropertyGroupDescriptor(null); } desc.setGroupDescriptor(group); if (parameterGroup != null) { this.groups.put(parameterGroup, group); } PropertyFeature parameterFeature = (PropertyFeature) annotations.get(PropertyFeature.class); if (parameterFeature != null) { if (group.getFeature() != null) { throw new RuntimeException( "Property [" + desc.getId() + "] has overriden a feature. (previous: [" + group.getFeature() + "], new: [" + parameterFeature.value() + "]"); } group.setFeature(parameterFeature.value()); } PropertyDisplayType displayTypeAnnotation = (PropertyDisplayType) annotations.get(PropertyDisplayType.class); Type displayType; if (displayTypeAnnotation != null && displayTypeAnnotation.value().length > 0) { Class[] types = displayTypeAnnotation.value().clone(); ArrayUtils.reverse(types); displayType = types[0]; for (int i = 1; i < types.length; i++) { displayType = new DefaultParameterizedType(null, types[i], displayType); } } else { displayType = desc.getPropertyType(); } desc.setDisplayType(displayType); }

Target:
private void setCommonProperties(DefaultPropertyDescriptor desc, Map<Class, Annotation> annotations) { desc.setMandatory(annotations.get(PropertyMandatory.class) != null); desc.setDeprecated(annotations.get(Deprecated.class) != null); desc.setAdvanced(annotations.get(PropertyAdvanced.class) != null); PropertyGroup parameterGroup = (PropertyGroup) annotations.get(PropertyGroup.class); PropertyGroupDescriptor group = this.groups.get(parameterGroup); if (group == null && parameterGroup != null) { group = new PropertyGroupDescriptor(Arrays.asList(parameterGroup.value())); } else if (group == null) { group = new PropertyGroupDescriptor(null); } desc.setGroupDescriptor(group); if (parameterGroup != null) { this.groups.put(parameterGroup, group); } PropertyFeature parameterFeature = (PropertyFeature) annotations.get(PropertyFeature.class); if (parameterFeature != null) { if (group.getFeature() != null) { throw new RuntimeException( "Property [" + desc.getId() + "] has overriden a feature. (previous: [" + group.getFeature() + "], new: [" + parameterFeature.value() + "]"); } group.setFeature(parameterFeature.value()); } PropertyDisplayType displayTypeAnnotation = (PropertyDisplayType) annotations.get(PropertyDisplayType.class); Type displayType; if (displayTypeAnnotation != null && displayTypeAnnotation.value().length > 0) { Class[] types = displayTypeAnnotation.value(); if (types.length > 1) { displayType = new DefaultParameterizedType(null, types[0], ArrayUtils.remove(types, 0)); } else { displayType = types[0]; } } else { displayType = desc.getPropertyType(); } desc.setDisplayType(displayType); }