// Now add the properties defined in annotations.
MetadataAnnotation properties = getAnnotation(Properties.class);
if (properties != null) {
for (Object property : (Object[]) properties.getAttributeArray("value")) {
getDescriptor().addProperty(new PropertyMetadata((MetadataAnnotation)property, getAccessibleObject()));
}
}
MetadataAnnotation property = getAnnotation(Property.class);
if (property != null) {
getDescriptor().addProperty(new PropertyMetadata(property, getAccessibleObject()));
}
}