Java Code Examples for com.sun.tools.classfile.ConstantPool#UnexpectedEntry

The following examples show how to use com.sun.tools.classfile.ConstantPool#UnexpectedEntry . 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: AnnotationDefaultVerifier.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void testElementValue(
        TestResult testCase,
        ClassFile classFile,
        Annotation.element_value element_value,
        String[] values)
        throws ConstantPool.InvalidIndex, ConstantPool.UnexpectedEntry {
    Annotation.Enum_element_value ev = (Annotation.Enum_element_value) element_value;
    testCase.checkEquals(classFile.constant_pool.getUTF8Info(ev.type_name_index).value,
            values[0], "type_name_index");
    testCase.checkEquals(classFile.constant_pool.getUTF8Info(ev.const_name_index).value,
            values[1], "const_name_index");
}
 
Example 2
Source File: AnnotationDefaultVerifier.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void testElementValue(
        TestResult testCase,
        ClassFile classFile,
        Annotation.element_value element_value,
        String[] values)
        throws ConstantPool.InvalidIndex, ConstantPool.UnexpectedEntry {
    Annotation.Class_element_value ev = (Annotation.Class_element_value) element_value;
    testCase.checkEquals(
            classFile.constant_pool.getUTF8Info(ev.class_info_index).value,
            values[0], "class_info_index");
}
 
Example 3
Source File: AnnotationDefaultVerifier.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void testElementValue(int tag, TestResult testResult, ClassFile classFile,
                             Annotation.element_value element_value, String[] values)
        throws ConstantPool.UnexpectedEntry, ConstantPool.InvalidIndex {
    get(tag).testElementValue(testResult, classFile, element_value, values);
}
 
Example 4
Source File: AnnotationDefaultVerifier.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public abstract void testElementValue(
TestResult testCase,
ClassFile classFile,
Annotation.element_value element_value,
String[] values)
throws ConstantPool.InvalidIndex, ConstantPool.UnexpectedEntry;