}
}
for (final BodyDeclaration member : members) {
if (member instanceof FieldDeclaration) {
final FieldDeclaration castMember = (FieldDeclaration) member;
for (final VariableDeclarator var : castMember
.getVariables()) {
final FieldMetadata field = JavaParserFieldMetadataBuilder
.getInstance(declaredByMetadataId, castMember,
var, compilationUnitServices,
typeParameterNames).build();
final CommentStructure commentStructure = new CommentStructure();
JavaParserCommentMetadataBuilder.updateCommentsToRoo(
commentStructure, member);
field.setCommentStructure(commentStructure);
cidBuilder.addField(field);
}
}
if (member instanceof MethodDeclaration) {
final MethodDeclaration castMember = (MethodDeclaration) member;
final MethodMetadata method = JavaParserMethodMetadataBuilder
.getInstance(declaredByMetadataId, castMember,
compilationUnitServices, typeParameterNames)
.build();
final CommentStructure commentStructure = new CommentStructure();
JavaParserCommentMetadataBuilder.updateCommentsToRoo(
commentStructure, member);
method.setCommentStructure(commentStructure);
cidBuilder.addMethod(method);
}
if (member instanceof ConstructorDeclaration) {
final ConstructorDeclaration castMember = (ConstructorDeclaration) member;
final ConstructorMetadata constructor = JavaParserConstructorMetadataBuilder
.getInstance(declaredByMetadataId, castMember,
compilationUnitServices, typeParameterNames)
.build();
final CommentStructure commentStructure = new CommentStructure();
JavaParserCommentMetadataBuilder.updateCommentsToRoo(
commentStructure, member);
constructor.setCommentStructure(commentStructure);
cidBuilder.addConstructor(constructor);
}
if (member instanceof TypeDeclaration) {
final TypeDeclaration castMember = (TypeDeclaration) member;
final JavaType innerType = new JavaType(
castMember.getName(), name);
final String innerTypeMetadataId = PhysicalTypeIdentifier
.createIdentifier(innerType, PhysicalTypeIdentifier
.getPath(declaredByMetadataId));
final ClassOrInterfaceTypeDetails cid = new JavaParserClassOrInterfaceTypeDetailsBuilder(
compilationUnit, compilationUnitServices,