@Override public void endElement(String uri, String localName, String qName) throws SAXException { if (qName.equalsIgnoreCase("class")) { classInfo.put(className, oci); className = null; oci = null; } else if (qName.equalsIgnoreCase("comment") && oci != null) { if (methodName != null) { // do nothing if (isGetter(methodName)) { MethodInfo mi = oci.getMethods.get(methodName); if (mi == null) { mi = new MethodInfo(); oci.getMethods.put(methodName, mi); } mi.comment = comment.toString(); } else if (isSetter(methodName)) { MethodInfo mi = oci.setMethods.get(methodName); if (mi == null) { mi = new MethodInfo(); oci.setMethods.put(methodName, mi); } mi.comment = comment.toString(); } } else if (fieldName != null) { oci.fields.put(fieldName, comment.toString()); } else { oci.comment = comment.toString(); } comment = null; } else if (qName.equalsIgnoreCase("field")) { fieldName = null; } else if (qName.equalsIgnoreCase("method")) { methodName = null; } }