java.lang.reflect.Type typeOfSrc,
JsonSerializationContext context) {
JsonObject jsonObject = new JsonObject();
jsonObject.add(CLASSNAME, new JsonPrimitive(src.getName()));
JsonArray issuesJsonArray = new JsonArray();
TestAnnotations testAnnotationsForClass = TestAnnotations.forClass(src);
String[] annotatedIssuesForTestCase = testAnnotationsForClass.getAnnotatedIssuesForTestCase(src);
addIssuesToCollectingJsonArray(issuesJsonArray, annotatedIssuesForTestCase);
String annotatedIssueForTestCase = testAnnotationsForClass.getAnnotatedIssueForTestCase(src);
if (annotatedIssueForTestCase != null) {
issuesJsonArray.add(new JsonPrimitive(annotatedIssueForTestCase));
}
for (Method currentMethod : src.getMethods()) {
String[] annotatedIssuesForMethod = testAnnotationsForClass
.getAnnotatedIssuesForMethod(currentMethod.getName());
addIssuesToCollectingJsonArray(issuesJsonArray,
annotatedIssuesForMethod);
Optional<String> annotatedIssueForMethod = testAnnotationsForClass
.getAnnotatedIssueForMethod(currentMethod.getName());
if (annotatedIssueForMethod.isPresent()) {
issuesJsonArray.add(new JsonPrimitive(
annotatedIssueForMethod.get()));
}