Java Code Examples for com.sun.tools.classfile.ConstantPool#getClassInfo()

The following examples show how to use com.sun.tools.classfile.ConstantPool#getClassInfo() . 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: StackMapWriter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 2
Source File: StackMapWriter.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 3
Source File: StackMapWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 4
Source File: StackMapWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 5
Source File: StackMapWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 6
Source File: StackMapWriter.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 7
Source File: StackMapWriter.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}
 
Example 8
Source File: StackMapWriter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
void print(verification_type_info entry) {
    if (entry == null) {
        print("ERROR");
        return;
    }

    switch (entry.tag) {
        case -1:
            print(((CustomVerificationTypeInfo) entry).text);
            break;

        case ITEM_Top:
            print("top");
            break;

        case ITEM_Integer:
            print("int");
            break;

        case ITEM_Float:
            print("float");
            break;

        case ITEM_Long:
            print("long");
            break;

        case ITEM_Double:
            print("double");
            break;

        case ITEM_Null:
            print("null");
            break;

        case ITEM_UninitializedThis:
            print("uninit_this");
            break;

        case ITEM_Object:
            try {
                ConstantPool cp = classWriter.getClassFile().constant_pool;
                ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
                print(cp.getUTF8Value(class_info.name_index));
            } catch (ConstantPoolException e) {
                print("??");
            }
            break;

        case ITEM_Uninitialized:
            print(((Uninitialized_variable_info) entry).offset);
            break;
    }

}