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 File: ClassReader.java From dragonwell8_jdk with 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 File: ClassReader.java From jdk8u-jdk with 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 3
Source File: ClassReader.java From openjdk-jdk8u with 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 File: ClassReader.java From openjdk-jdk9 with 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 5
Source File: ClassReader.java From openjdk-8 with 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 File: ClassReader.java From jdk8u-dev-jdk with 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 7
Source File: ClassReader.java From dragonwell8_jdk with 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 8
Source File: ClassReader.java From jdk8u_jdk with 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 9
Source File: ClassReader.java From openjdk-jdk8u-backup with 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 File: ClassReader.java From openjdk-8-source with 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 File: ClassReader.java From openjdk-jdk9 with 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 12
Source File: ClassReader.java From openjdk-8 with 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 13
Source File: ClassReader.java From jdk8u-jdk with 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 14
Source File: ClassReader.java From openjdk-8 with 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 15
Source File: ClassReader.java From TencentKona-8 with 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 16
Source File: ClassReader.java From openjdk-8-source with 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 17
Source File: ClassReader.java From jdk8u-jdk with 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 File: ClassReader.java From TencentKona-8 with 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 File: ClassReader.java From openjdk-jdk9 with 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 20
Source File: ClassReader.java From jdk8u_jdk with 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; }