// Without inheritance
EList<Property> properties = clazz.getAttributes();
for (Property property : properties) {
// Create getter for each property
// Return type?
Type type = property.getType();
logger.log(Level.FINE, "Class: " + clazz.getName() + " - "
+ "Property: " + property.getName() + " - "
+ "Property Upper: " + property.getUpper() + " - "
+ "Property Lower: " + property.getLower());
String umlTypeName = type.getName();
String umlQualifiedTypeName = type.getQualifiedName();
// Only for parameterized type
if (dataTypeUtils.isParameterizedType(umlTypeName)) {
Map<String, String> types = umlHelper
.checkParameterizedTypeForTemplateParameterSubstitution(type);
umlTypeName = types.get("umlTypeName");
umlQualifiedTypeName = types.get("umlQualifiedTypeName");
}
// Check the property name, no content means we have to get the
// "type" and use it as the name
if (property.getName().equals("")) {
Type targetType = property.getType();
String newPropertyName = "";
if (property.getUpper() >= 0) {
// Upper Cardinality 0..1
newPropertyName = targetType.getName();
} else {
// Upper Cardinality 0..*
newPropertyName = methodHelper.getPluralName(targetType
.getName());
}
property.setName(StringUtils.uncapitalize(newPropertyName));
}