List of usage examples for org.jdom2 Attribute isSpecified
public boolean isSpecified()
From source file:com.speedment.codgen.example.uml.TransformDelegator.java
License:Open Source License
default <M> void declareVisibility(M out, Element in) { final Attribute visible = in.getAttribute("visibility"); if (visible != null && visible.isSpecified()) { ifType(visible, out, public_.class, public_::public_); ifType(visible, out, private_.class, private_::private_); ifType(visible, out, protected_.class, protected_::protected_); }// w w w. j av a2 s . c om }
From source file:io.wcm.maven.plugins.contentpackage.unpacker.OneAttributePerLineXmlProcessor.java
License:Apache License
@Override protected void printAttribute(Writer out, FormatStack fstack, Attribute attribute) throws IOException { if (!attribute.isSpecified() && fstack.isSpecifiedAttributesOnly()) { return;/* ww w.j a va2 s . com*/ } write(out, StringUtils.defaultString(fstack.getLineSeparator())); write(out, StringUtils.defaultString(fstack.getLevelIndent())); write(out, StringUtils.defaultString(fstack.getIndent())); write(out, StringUtils.defaultString(fstack.getIndent())); write(out, attribute.getQualifiedName()); write(out, "="); write(out, "\""); attributeEscapedEntitiesFilter(out, fstack, attribute.getValue()); write(out, "\""); }