Class SchemaConstant
- java.lang.Object
-
- net.sourceforge.pmd.util.internal.xml.SchemaConstant
-
public class SchemaConstant extends Object
Wraps the name of eg an attribute or element, and provides convenience methods to query the DOM.
-
-
Constructor Summary
Constructors Constructor Description SchemaConstant(String name)
-
Method Summary
-
-
-
Constructor Detail
-
SchemaConstant
public SchemaConstant(String name)
-
-
Method Detail
-
getAsBooleanAttr
public boolean getAsBooleanAttr(Element e, boolean defaultValue)
-
getAttributeOrThrow
public @NonNull String getAttributeOrThrow(Element element, PmdXmlReporter err)
-
getNonBlankAttributeOrThrow
public @NonNull String getNonBlankAttributeOrThrow(Element element, PmdXmlReporter err)
-
hasAttribute
public boolean hasAttribute(Element element)
-
getElementChildrenNamedReportOthers
public List<Element> getElementChildrenNamedReportOthers(Element elt, PmdXmlReporter err)
-
getSingleChildIn
public Element getSingleChildIn(Element elt, PmdXmlReporter err)
-
getOptChildIn
public Element getOptChildIn(Element elt, PmdXmlReporter err)
-
xmlName
public String xmlName()
Returns the String name of this attribute.- Returns:
- The attribute's name
-
matchesElt
public boolean matchesElt(Node node)
-
getNonBlankAttribute
public @NonNull String getNonBlankAttribute(Element ruleElement, PmdXmlReporter err)
-
-