Java Code Examples for xmlkit.XMLKit.Element#addAll()

The following examples show how to use xmlkit.XMLKit.Element#addAll() . 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
private void attachTo(Element x, Object aval0) {
    if (aval0 == null) {
        return;
    }
    if (!(aval0 instanceof Element)) {
        x.add(aval0);
        return;
    }
    Element aval = (Element) aval0;
    if (!aval.isAnonymous()) {
        x.add(aval);
        return;
    }
    for (int imax = aval.attrSize(), i = 0; i < imax; i++) {
        //%%
        attachAttrTo(x, aval.getAttrName(i), aval.getAttr(i));
    }
    x.addAll(aval);
}
 
Example 2
private void attachTo(Element x, Object aval0) {
    if (aval0 == null) {
        return;
    }
    if (!(aval0 instanceof Element)) {
        x.add(aval0);
        return;
    }
    Element aval = (Element) aval0;
    if (!aval.isAnonymous()) {
        x.add(aval);
        return;
    }
    for (int imax = aval.attrSize(), i = 0; i < imax; i++) {
        //%%
        attachAttrTo(x, aval.getAttrName(i), aval.getAttr(i));
    }
    x.addAll(aval);
}
 
Example 3
private void attachTo(Element x, Object aval0) {
    if (aval0 == null) {
        return;
    }
    if (!(aval0 instanceof Element)) {
        x.add(aval0);
        return;
    }
    Element aval = (Element) aval0;
    if (!aval.isAnonymous()) {
        x.add(aval);
        return;
    }
    for (int imax = aval.attrSize(), i = 0; i < imax; i++) {
        //%%
        attachAttrTo(x, aval.getAttrName(i), aval.getAttr(i));
    }
    x.addAll(aval);
}
 
Example 4
Source Project: hottub   File: ClassReader.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void attachTo(Element x, Object aval0) {
    if (aval0 == null) {
        return;
    }
    if (!(aval0 instanceof Element)) {
        x.add(aval0);
        return;
    }
    Element aval = (Element) aval0;
    if (!aval.isAnonymous()) {
        x.add(aval);
        return;
    }
    for (int imax = aval.attrSize(), i = 0; i < imax; i++) {
        //%%
        attachAttrTo(x, aval.getAttrName(i), aval.getAttr(i));
    }
    x.addAll(aval);
}
 
Example 5
@Override
public Element visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended s, Void p) {
    Element e = new Element("SameLocals1StackItemFrameExtended");
    e.setAttr("tag", "" + s.frame_type);
    e.addAll(getVerificationTypeInfo("Stack", s.stack));
    e.trimToSize();
    return e;
}
 
Example 6
@Override
public Element visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended s, Void p) {
    Element e = new Element("SameLocals1StackItemFrameExtended");
    e.setAttr("tag", "" + s.frame_type);
    e.addAll(getVerificationTypeInfo("Stack", s.stack));
    e.trimToSize();
    return e;
}
 
Example 7
@Override
public Element visit_append_frame(append_frame a, Void p) {
   Element e = new Element("AppendFrame" + (a.frame_type - 251));
   e.setAttr("tag", "" + a.frame_type);
   e.addAll(getVerificationTypeInfo("Local", a.locals));
   e.trimToSize();
   return e;
}
 
Example 8
Source Project: hottub   File: ClassReader.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Element visit_full_frame(full_frame fl_frm, Void p) {
     Element e = new Element("FullFrame");
     e.setAttr("tag", "" + fl_frm.frame_type);
     e.addAll(getVerificationTypeInfo("Local", fl_frm.locals));
     e.trimToSize();
     return e;
}
 
Example 9
@Override
public Element visit_append_frame(append_frame a, Void p) {
   Element e = new Element("AppendFrame" + (a.frame_type - 251));
   e.setAttr("tag", "" + a.frame_type);
   e.addAll(getVerificationTypeInfo("Local", a.locals));
   e.trimToSize();
   return e;
}
 
Example 10
@Override
public Element visit_append_frame(append_frame a, Void p) {
   Element e = new Element("AppendFrame" + (a.frame_type - 251));
   e.setAttr("tag", "" + a.frame_type);
   e.addAll(getVerificationTypeInfo("Local", a.locals));
   e.trimToSize();
   return e;
}
 
Example 11
@Override
public Element visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame s, Void p) {
    Element e = new Element("SameLocals1StackItemFrame");
    e.setAttr("tag", "" + s.frame_type);
    e.addAll(getVerificationTypeInfo("Stack", s.stack));
    e.trimToSize();
    return e;
}
 
Example 12
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 13
@Override
public Element visit_full_frame(full_frame fl_frm, Void p) {
     Element e = new Element("FullFrame");
     e.setAttr("tag", "" + fl_frm.frame_type);
     e.addAll(getVerificationTypeInfo("Local", fl_frm.locals));
     e.trimToSize();
     return e;
}
 
Example 14
@Override
public Element visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame s, Void p) {
    Element e = new Element("SameLocals1StackItemFrame");
    e.setAttr("tag", "" + s.frame_type);
    e.addAll(getVerificationTypeInfo("Stack", s.stack));
    e.trimToSize();
    return e;
}
 
Example 15
@Override
public Element visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended s, Void p) {
    Element e = new Element("SameLocals1StackItemFrameExtended");
    e.setAttr("tag", "" + s.frame_type);
    e.addAll(getVerificationTypeInfo("Stack", s.stack));
    e.trimToSize();
    return e;
}
 
Example 16
@Override
public Element visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame s, Void p) {
    Element e = new Element("SameLocals1StackItemFrame");
    e.setAttr("tag", "" + s.frame_type);
    e.addAll(getVerificationTypeInfo("Stack", s.stack));
    e.trimToSize();
    return e;
}
 
Example 17
@Override
public Element visit_append_frame(append_frame a, Void p) {
   Element e = new Element("AppendFrame" + (a.frame_type - 251));
   e.setAttr("tag", "" + a.frame_type);
   e.addAll(getVerificationTypeInfo("Local", a.locals));
   e.trimToSize();
   return e;
}
 
Example 18
@Override
public Element visit_full_frame(full_frame fl_frm, Void p) {
     Element e = new Element("FullFrame");
     e.setAttr("tag", "" + fl_frm.frame_type);
     e.addAll(getVerificationTypeInfo("Local", fl_frm.locals));
     e.trimToSize();
     return e;
}
 
Example 19
@Override
public Element visit_full_frame(full_frame fl_frm, Void p) {
     Element e = new Element("FullFrame");
     e.setAttr("tag", "" + fl_frm.frame_type);
     e.addAll(getVerificationTypeInfo("Local", fl_frm.locals));
     e.trimToSize();
     return e;
}
 
Example 20
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);
}