Java Code Examples for xmlkit.XMLKit.Element#sort()
The following examples show how to use
xmlkit.XMLKit.Element#sort() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dragonwell8_jdk File: ClassReader.java License: GNU General Public License v2.0 | 6 votes |
@Override public Element visitBootstrapMethods(BootstrapMethods_attribute bm, Element p) { Element e = new Element(x.getCpString(bm.attribute_name_index)); for (BootstrapMethods_attribute.BootstrapMethodSpecifier bsm : bm.bootstrap_method_specifiers) { Element be = new Element("BootstrapMethodSpecifier"); be.setAttr("ref", x.getCpString(bsm.bootstrap_method_ref)); if (bsm.bootstrap_arguments.length > 0) { Element bme = new Element("MethodArguments"); for (int index : bsm.bootstrap_arguments) { bme.add(x.getCpString(index)); } bme.trimToSize(); be.add(bme); } be.trimToSize(); e.add(be); } e.trimToSize(); if (!x.keepOrder) { e.sort(); } p.add(e); return null; }
Example 2
Source Project: openjdk-jdk9 File: ClassReader.java License: GNU General Public License v2.0 | 6 votes |
@Override public Element visitModuleHashes(ModuleHashes_attribute attr, Element p) { Element e = new Element(x.getCpString(attr.attribute_name_index)); e.setAttr("Algorithm", x.getCpString(attr.algorithm_index)); for (Entry entry : attr.hashes_table) { Element ee = new Element("Entry"); String mn = x.getCpString(entry.module_name_index); ee.setAttr("module_name", mn); ee.setAttr("hash_length", "" + entry.hash.length); StringBuilder sb = new StringBuilder(); for (byte b: entry.hash) { sb.append(String.format("%02x", b & 0xff)); } ee.setAttr("hash", sb.toString()); ee.trimToSize(); e.add(ee); } e.trimToSize(); e.sort(); p.add(e); return null; }
Example 3
Source Project: openjdk-8 File: ClassReader.java License: GNU General Public License v2.0 | 6 votes |
@Override public Element visitBootstrapMethods(BootstrapMethods_attribute bm, Element p) { Element e = new Element(x.getCpString(bm.attribute_name_index)); for (BootstrapMethods_attribute.BootstrapMethodSpecifier bsm : bm.bootstrap_method_specifiers) { Element be = new Element("BootstrapMethodSpecifier"); be.setAttr("ref", x.getCpString(bsm.bootstrap_method_ref)); if (bsm.bootstrap_arguments.length > 0) { Element bme = new Element("MethodArguments"); for (int index : bsm.bootstrap_arguments) { bme.add(x.getCpString(index)); } bme.trimToSize(); be.add(bme); } be.trimToSize(); e.add(be); } e.trimToSize(); if (!x.keepOrder) { e.sort(); } p.add(e); return null; }
Example 4
Source Project: openjdk-jdk8u File: ClassReader.java License: GNU General Public License v2.0 | 6 votes |
@Override public Element visitBootstrapMethods(BootstrapMethods_attribute bm, Element p) { Element e = new Element(x.getCpString(bm.attribute_name_index)); for (BootstrapMethods_attribute.BootstrapMethodSpecifier bsm : bm.bootstrap_method_specifiers) { Element be = new Element("BootstrapMethodSpecifier"); be.setAttr("ref", x.getCpString(bsm.bootstrap_method_ref)); if (bsm.bootstrap_arguments.length > 0) { Element bme = new Element("MethodArguments"); for (int index : bsm.bootstrap_arguments) { bme.add(x.getCpString(index)); } bme.trimToSize(); be.add(bme); } be.trimToSize(); e.add(be); } e.trimToSize(); if (!x.keepOrder) { e.sort(); } p.add(e); return null; }
Example 5
Source Project: jdk8u-jdk File: ClassReader.java License: GNU General Public License v2.0 | 6 votes |
@Override public Element visitBootstrapMethods(BootstrapMethods_attribute bm, Element p) { Element e = new Element(x.getCpString(bm.attribute_name_index)); for (BootstrapMethods_attribute.BootstrapMethodSpecifier bsm : bm.bootstrap_method_specifiers) { Element be = new Element("BootstrapMethodSpecifier"); be.setAttr("ref", x.getCpString(bsm.bootstrap_method_ref)); if (bsm.bootstrap_arguments.length > 0) { Element bme = new Element("MethodArguments"); for (int index : bsm.bootstrap_arguments) { bme.add(x.getCpString(index)); } bme.trimToSize(); be.add(bme); } be.trimToSize(); e.add(be); } e.trimToSize(); if (!x.keepOrder) { e.sort(); } p.add(e); return null; }
Example 6
Source Project: dragonwell8_jdk File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
protected void readAttributesFor(ClassFile c, Attributes attrs, Element x) { Element container = new Element(); AttributeVisitor av = new AttributeVisitor(this, c); for (Attribute a : attrs) { av.visit(a, container); } if (!keepOrder) { container.sort(); } x.addAll(container); }
Example 7
Source Project: jdk8u_jdk File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute rita, Element p) { Element e = new Element(x.getCpString(rita.attribute_name_index)); for (TypeAnnotation pa : rita.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 8
Source Project: openjdk-jdk9 File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
protected void readAttributesFor(ClassFile c, Attributes attrs, Element x) { Element container = new Element(); AttributeVisitor av = new AttributeVisitor(this, c); for (Attribute a : attrs) { av.visit(a, container); } if (!keepOrder) { container.sort(); } x.addAll(container); }
Example 9
Source Project: TencentKona-8 File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
protected void readAttributesFor(ClassFile c, Attributes attrs, Element x) { Element container = new Element(); AttributeVisitor av = new AttributeVisitor(this, c); for (Attribute a : attrs) { av.visit(a, container); } if (!keepOrder) { container.sort(); } x.addAll(container); }
Example 10
Source Project: jdk8u-jdk File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute rita, Element p) { Element e = new Element(x.getCpString(rita.attribute_name_index)); for (TypeAnnotation pa : rita.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 11
Source Project: openjdk-8-source File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
protected void readAttributesFor(ClassFile c, Attributes attrs, Element x) { Element container = new Element(); AttributeVisitor av = new AttributeVisitor(this, c); for (Attribute a : attrs) { av.visit(a, container); } if (!keepOrder) { container.sort(); } x.addAll(container); }
Example 12
Source Project: TencentKona-8 File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute rita, Element p) { Element e = new Element(x.getCpString(rita.attribute_name_index)); for (TypeAnnotation pa : rita.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 13
Source Project: openjdk-8 File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute rita, Element p) { Element e = new Element(x.getCpString(rita.attribute_name_index)); for (TypeAnnotation pa : rita.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 14
Source Project: jdk8u-jdk File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute rvta, Element p) { Element e = new Element(x.getCpString(rvta.attribute_name_index)); for (TypeAnnotation pa : rvta.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 15
Source Project: openjdk-8 File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute rvta, Element p) { Element e = new Element(x.getCpString(rvta.attribute_name_index)); for (TypeAnnotation pa : rvta.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 16
Source Project: openjdk-jdk9 File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitModulePackages(ModulePackages_attribute attr, Element p) { Element e = new Element(x.getCpString(attr.attribute_name_index)); for (int i : attr.packages_index) { Element ee = new Element("Package"); String pkg = x.getCpString(i); ee.setAttr("package", pkg); e.add(ee); } e.trimToSize(); e.sort(); p.add(e); return null; }
Example 17
Source Project: openjdk-8-source File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute rita, Element p) { Element e = new Element(x.getCpString(rita.attribute_name_index)); for (TypeAnnotation pa : rita.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 18
Source Project: openjdk-jdk8u-backup File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
protected void readAttributesFor(ClassFile c, Attributes attrs, Element x) { Element container = new Element(); AttributeVisitor av = new AttributeVisitor(this, c); for (Attribute a : attrs) { av.visit(a, container); } if (!keepOrder) { container.sort(); } x.addAll(container); }
Example 19
Source Project: jdk8u_jdk File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute rvta, Element p) { Element e = new Element(x.getCpString(rvta.attribute_name_index)); for (TypeAnnotation pa : rvta.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }
Example 20
Source Project: jdk8u-dev-jdk File: ClassReader.java License: GNU General Public License v2.0 | 5 votes |
@Override public Element visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute rita, Element p) { Element e = new Element(x.getCpString(rita.attribute_name_index)); for (TypeAnnotation pa : rita.annotations) { parseTypeAnnotations(pa, e); } e.sort(); p.add(e); return null; }