Code example for AttributesImpl

Methods: addAttribute

0
    public void visitSource(String source, String debug) {
        if (source == null && debug == null) {
            return; 
        } 
 
        AttributesImpl att = new AttributesImpl();
        if (source != null)
            att.addAttribute("", "file", "file", "", encode(source));
        if (debug != null)
            att.addAttribute("", "debug", "debug", "", encode(debug));
 
        addElement("source", att);
    } 
 
    public void visitOuterClass(String owner, String name, String desc) {
        AttributesImpl att = new AttributesImpl();
        att.addAttribute("", "owner", "owner", "", owner);
        if (name != null)
            att.addAttribute("", "name", "name", "", name);
        if (desc != null)
            att.addAttribute("", "desc", "desc", "", desc);