/** * Start a class. Parses out class name by default. Return * false to skip class element and its contents. */ protected boolean startClass(String elem, Attributes attrs) throws SAXException { if (getClassAttributeName() != null) { _class = attrs.getValue(getClassAttributeName()); if (!StringUtils.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } return true; }
/** * Start a class. Parses out class name by default. Return * false to skip class element and its contents. */ protected boolean startClass(String elem, Attributes attrs) throws SAXException { if (getClassAttributeName() != null) { _class = attrs.getValue(getClassAttributeName()); if (!StringUtils.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } return true; }
/** * Start a class. Parses out class name by default. Return * false to skip class element and its contents. */ protected boolean startClass(String elem, Attributes attrs) throws SAXException { if (getClassAttributeName() != null) { _class = attrs.getValue(getClassAttributeName()); if (!StringUtil.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } return true; }
/** * Start a class. Parses out class name by default. Return * false to skip class element and its contents. */ protected boolean startClass(String elem, Attributes attrs) throws SAXException { if (getClassAttributeName() != null) { _class = attrs.getValue(getClassAttributeName()); if (!StringUtil.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } return true; }
/** * End a class. Parses contained text by default. */ protected void endClass(String elem) throws SAXException { if (getClassAttributeName() != null) _class = null; else { _class = currentText(); if (!StringUtils.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } }
/** * End a class. Parses contained text by default. */ protected void endClass(String elem) throws SAXException { if (getClassAttributeName() != null) _class = null; else { _class = currentText(); if (!StringUtils.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } }
/** * End a class. Parses contained text by default. */ protected void endClass(String elem) throws SAXException { if (getClassAttributeName() != null) _class = null; else { _class = currentText(); if (!StringUtil.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } }
/** * End a class. Parses contained text by default. */ protected void endClass(String elem) throws SAXException { if (getClassAttributeName() != null) _class = null; else { _class = currentText(); if (!StringUtil.isEmpty(_package) && _class.indexOf('.') == -1) _class = _package + "." + _class; } }
return startClass(name, attrs); if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) return startClassElement(name, attrs); if (depth > getPackageElementDepth() && _package != null
endClass(name); else if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) endClassElement(name); else if (depth > getPackageElementDepth() && _package != null
return startClass(name, attrs); if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) return startClassElement(name, attrs); if (depth > getPackageElementDepth() && _package != null
return startClass(name, attrs); if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) return startClassElement(name, attrs); if (depth > getPackageElementDepth() && _package != null
endClass(name); else if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) endClassElement(name); else if (depth > getPackageElementDepth() && _package != null
endClass(name); else if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) endClassElement(name); else if (depth > getPackageElementDepth() && _package != null
protected boolean startElement(String name, Attributes attrs) throws SAXException { // skip root element int depth = currentDepth(); if (depth == 0) return true; try { if (depth == getPackageElementDepth() && isPackageElementName(name)) return startPackage(name, attrs); if (depth == getClassElementDepth() && isClassElementName(name)) return startClass(name, attrs); if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) return startClassElement(name, attrs); if (depth > getPackageElementDepth() && _package != null && getPackageAttributeName() != null) return startPackageElement(name, attrs); return startSystemElement(name, attrs); } catch (SAXException se) { throw se; } catch (NullPointerException npe) { throw getException(_loc.get("parse-error", name), npe); } }
protected void endElement(String name) throws SAXException { // skip root element int depth = currentDepth(); if (depth == 0) return; try { if (depth == getPackageElementDepth() && isPackageElementName(name)) endPackage(name); else if (depth == getClassElementDepth() && isClassElementName(name)) endClass(name); else if (depth > getClassElementDepth() && _class != null && getClassAttributeName() != null) endClassElement(name); else if (depth > getPackageElementDepth() && _package != null && getPackageAttributeName() != null) endPackageElement(name); else endSystemElement(name); } catch (SAXException se) { throw se; } catch (NullPointerException npe) { throw getException(_loc.get("parse-error", name), npe); } }