Java Code Examples for com.sun.tools.classfile.DefaultAttribute

The following examples show how to use com.sun.tools.classfile.DefaultAttribute. These examples are extracted from open source projects. 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
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   Source 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
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
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   Source 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   Source 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
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   Source 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;
}