com.sun.tools.classfile.DefaultAttribute Java Examples

The following examples show how to use com.sun.tools.classfile.DefaultAttribute. 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: TencentKona-8   Author: Tencent   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #2
Source Project: jdk8u60   Author: chenghanpeng   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #3
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #4
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #5
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #6
Source Project: hottub   Author: dsrg-uoft   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #7
Source Project: openjdk-8-source   Author: keerath   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}
 
Example #8
Source Project: openjdk-8   Author: bpupadhyaya   File: AttributeWriter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Void visitDefault(DefaultAttribute attr, Void ignore) {
    if (attr.reason != null) {
        report(attr.reason);
    }
    byte[] data = attr.info;
    int i = 0;
    int j = 0;
    print("  ");
    try {
        print(attr.getName(constant_pool));
    } catch (ConstantPoolException e) {
        report(e);
        print("attribute name = #" + attr.attribute_name_index);
    }
    print(": ");
    println("length = 0x" + toHex(attr.info.length));

    print("   ");

    while (i < data.length) {
        print(toHex(data[i], 2));

        j++;
        if (j == 16) {
            println();
            print("   ");
            j = 0;
        } else {
            print(" ");
        }
        i++;
    }
    println();
    return null;
}