@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (qName.equalsIgnoreCase("class")) { className = attributes.getValue("qualified"); oci = new OperatorClassInfo(); } else if (qName.equalsIgnoreCase("comment")) { comment = new StringBuilder(); } else if (qName.equalsIgnoreCase("tag")) { if (oci != null) { String tagName = attributes.getValue("name"); String tagText = attributes.getValue("text").trim(); if (methodName != null) { boolean lGetterCheck = isGetter(methodName); boolean lSetterCheck = !lGetterCheck && isSetter(methodName); if (lGetterCheck || lSetterCheck) { MethodTagType type = MethodTagType.from(tagName); if (type != null) { addTagToMethod(lGetterCheck ? oci.getMethods : oci.setMethods, tagText, type); } } // if ("@return".equals(tagName) && isGetter(methodName)) { // oci.getMethods.put(methodName, tagText); // } // do nothing } else if (fieldName != null) { // do nothing } else { oci.tags.put(tagName, tagText); } } } else if (qName.equalsIgnoreCase("field")) { fieldName = attributes.getValue("name"); } else if (qName.equalsIgnoreCase("method")) { methodName = attributes.getValue("name"); } }
static { for (MethodTagType type : MethodTagType.values()) { TAG_TEXT_MAPPING.put(type.tag, type); } }