private boolean hasExcludedMethods() { for (XmlClass xmlClass : m_classes) { if (!xmlClass.getExcludedMethods().isEmpty()) { return true; } } return false; }
private boolean hasExcludedMethods() { for (XmlClass xmlClass : m_classes) { if (!xmlClass.getExcludedMethods().isEmpty()) { return true; } } return false; }
private static void toYaml(StringBuilder result, String sp2, XmlClass xc) { List<XmlInclude> im = xc.getIncludedMethods(); List<String> em = xc.getExcludedMethods(); String name = (im.isEmpty() && em.isEmpty()) ? "" : "name: "; result.append(sp2).append("- ").append(name).append(xc.getName()).append("\n"); if (!im.isEmpty()) { result.append(sp2).append(" includedMethods:\n"); for (XmlInclude xi : im) { toYaml(result, sp2 + " ", xi); } } if (!em.isEmpty()) { result.append(sp2).append(" excludedMethods:\n"); toYaml(result, sp2 + " ", em); } }
private static void toYaml(StringBuilder result, String sp2, XmlClass xc) { List<XmlInclude> im = xc.getIncludedMethods(); List<String> em = xc.getExcludedMethods(); String name = (im.isEmpty() && em.isEmpty()) ? "" : "name: "; result.append(sp2).append("- ").append(name).append(xc.getName()).append("\n"); if (!im.isEmpty()) { result.append(sp2).append(" includedMethods:\n"); for (XmlInclude xi : im) { toYaml(result, sp2 + " ", xi); } } if (!em.isEmpty()) { result.append(sp2).append(" excludedMethods:\n"); toYaml(result, sp2 + " ", em); } }
for (String m: getExcludedMethods()) { Properties p= new Properties(); p.setProperty("name", m);
public String toXml(String indent) { XMLStringBuffer xsb = new XMLStringBuffer(indent); Properties prop = new Properties(); prop.setProperty("name", getName()); boolean hasMethods = !m_includedMethods.isEmpty() || !m_excludedMethods.isEmpty(); boolean hasParameters = !m_parameters.isEmpty(); if (hasParameters || hasMethods) { xsb.push("class", prop); XmlUtils.dumpParameters(xsb, m_parameters); if (hasMethods) { xsb.push("methods"); for (XmlInclude m : getIncludedMethods()) { xsb.getStringBuffer().append(m.toXml(indent + " ")); } for (String m : getExcludedMethods()) { Properties p = new Properties(); p.setProperty("name", m); xsb.addEmptyElement("exclude", p); } xsb.pop("methods"); } xsb.pop("class"); } else { xsb.addEmptyElement("class", prop); } return xsb.toXML(); }
public void addExcludedMethod(String className, String m) { XmlClass xmlClass= findClass(className); xmlClass.getExcludedMethods().add(m); getTest().getXmlClasses().add(xmlClass); }
/** * Clone an XmlClass by copying all its components. */ @Override public Object clone() { XmlClass result = new XmlClass(getName(), getIndex(), loadClasses()); result.setExcludedMethods(getExcludedMethods()); result.setIncludedMethods(getIncludedMethods()); return result; }
List<String> excludedMethods = createQualifiedMethodNames(xmlClass, xmlClass.getExcludedMethods()); boolean isExcludedInMethods = isExcluded(excludedMethods, fullMethodName); if (result) { result = isIncludedInMethods; if (!xmlClass.getExcludedMethods().isEmpty()) { result = result && !isExcludedInMethods;
/** Clone an XmlClass by copying all its components. */ @Override public Object clone() { XmlClass result = new XmlClass(getName(), getIndex(), loadClasses()); result.setExcludedMethods(getExcludedMethods()); result.setIncludedMethods(getIncludedMethods()); return result; }
isIncluded(includedMethods, noGroupsSpecified, fullMethodName); List<String> excludedMethods = createQualifiedMethodNames(xmlClass, xmlClass.getExcludedMethods()); boolean isExcludedInMethods = isExcluded(excludedMethods, fullMethodName); if (result) { result = isIncludedInMethods; if (!xmlClass.getExcludedMethods().isEmpty()) { result = result && !isExcludedInMethods;