cidBuilder.add(concreteClass.getRegisteredImports());
for (final MemberHoldingTypeDetails extendsTypeDetails : extendsTypesDetails) {
for (final ConstructorMetadata constructor : extendsTypeDetails
.getDeclaredConstructors()) {
final ConstructorMetadataBuilder abstractConstructor = new ConstructorMetadataBuilder(
abstractId);
abstractConstructor.setModifier(constructor.getModifier());
final Map<JavaSymbolName, JavaType> typeMap = resolveTypes(
extendsTypeDetails.getName(), concreteClass
.getExtendsTypes().get(0));
for (final AnnotatedJavaType type : constructor
.getParameterTypes()) {
JavaType newType = type.getJavaType();
if (type.getJavaType().getParameters().size() > 0) {
final ArrayList<JavaType> parameterTypes = new ArrayList<JavaType>();
for (final JavaType typeType : type.getJavaType()
.getParameters()) {
final JavaType typeParam = typeMap
.get(new JavaSymbolName(typeType.toString()));
if (typeParam != null) {
parameterTypes.add(typeParam);
}
}
newType = new JavaType(type.getJavaType()
.getFullyQualifiedTypeName(), type
.getJavaType().getArray(), type.getJavaType()
.getDataType(),
type.getJavaType().getArgName(), parameterTypes);
}
abstractConstructor.getParameterTypes().add(
new AnnotatedJavaType(newType));
}
abstractConstructor.setParameterNames(constructor
.getParameterNames());
final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
bodyBuilder.newLine().indent().append("super(");
int i = 0;
for (final JavaSymbolName paramName : abstractConstructor
.getParameterNames()) {
bodyBuilder.append(" ").append(paramName.getSymbolName());
if (abstractConstructor.getParameterTypes().size() > i + 1) {
bodyBuilder.append(", ");
}
i++;
}
bodyBuilder.append(");");
bodyBuilder.newLine().indentRemove();
abstractConstructor.setBodyBuilder(bodyBuilder);
cidBuilder.getDeclaredConstructors().add(abstractConstructor);
}
}
return cidBuilder;
}