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

The following examples show how to use com.sun.tools.classfile.ConstantPool#CONSTANT_Float_info . 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 {
    Annotation.Primitive_element_value ev =
            (Annotation.Primitive_element_value) element_value;
    ConstantPool.CONSTANT_Float_info info =
            (ConstantPool.CONSTANT_Float_info)
                    classFile.constant_pool.get(ev.const_value_index);
    testCase.checkEquals(info.value, Float.parseFloat(values[0]), "const_value_index");
}
 
Example 2
Source File: TestAnnotationInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void testElementValue(TestResult testResult,
                             ClassFile classFile,
                             Annotation.element_value element_value)
        throws ConstantPool.InvalidIndex {
    testTag(testResult, element_value.tag);
    Annotation.Primitive_element_value ev =
            (Annotation.Primitive_element_value) element_value;
    ConstantPool.CONSTANT_Float_info info =
            (ConstantPool.CONSTANT_Float_info) classFile.constant_pool.get(ev.const_value_index);
    testResult.checkEquals(info.value, value, "const_value_index");
}
 
Example 3
Source File: CPSelector.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Void visitFloat(ConstantPool.CONSTANT_Float_info info, CPEntries p) {
    return null;
}