+ private static String getReturnType(RuntimeBeanEntry entry, AttributeIfc attributeIfc) {
+ String returnType;
+ if (attributeIfc instanceof TypedAttribute) {
+ returnType = ((TypedAttribute) attributeIfc).getType()
+ .getFullyQualifiedName();
+ } else if (attributeIfc instanceof TOAttribute) {
+ String fullyQualifiedName = FullyQualifiedNameHelper
+ .getFullyQualifiedName(entry.getPackageName(),
+ attributeIfc.getUpperCaseCammelCase());
+
+ returnType = fullyQualifiedName;
+ } else if (attributeIfc instanceof ListAttribute) {
+ AttributeIfc innerAttr = ((ListAttribute) attributeIfc)
+ .getInnerAttribute();
+
+ String innerTpe = innerAttr instanceof TypedAttribute ? ((TypedAttribute) innerAttr)
+ .getType().getFullyQualifiedName()
+ : FullyQualifiedNameHelper.getFullyQualifiedName(
+ entry.getPackageName(),
+ attributeIfc.getUpperCaseCammelCase());
+
+ returnType = "java.util.List<" + innerTpe + ">";
+ } else if (attributeIfc == VoidAttribute.getInstance()) {
+ return "void";
+ } else {
+ throw new UnsupportedOperationException(
+ "Attribute not supported: "
+ + attributeIfc.getClass());
+ }
+ return returnType;
+ }
+