Java Code Examples for com.sun.tools.classfile.Field#getName()

The following examples show how to use com.sun.tools.classfile.Field#getName() . 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: Driver.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void testFields(Map<String, ExpectedSignature> expectedSignatures, ClassFile classFile)
        throws ConstantPoolException {
    String className = classFile.getName();
    Set<String> foundFields = new HashSet<>();
    for (Field field : classFile.fields) {
        String fieldName = field.getName(classFile.constant_pool);
        printf("Testing field %s\n", fieldName);
        testAttribute(
                fieldName,
                classFile,
                () -> (Signature_attribute) field.attributes.get(Attribute.Signature),
                expectedSignatures.get(fieldName));
        foundFields.add(fieldName);
    }
    checkAllMembersFound(foundFields, expectedSignatures,
            "Checking that all fields of class " + className + " with Signature attribute found");
}
 
Example 2
Source File: ClassWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 3
Source File: ClassWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 4
Source File: ClassWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 5
Source File: ClassWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 6
Source File: ClassWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 7
Source File: ClassWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 8
Source File: ClassWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}
 
Example 9
Source File: ClassWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
String getFieldName(Field f) {
    try {
        return f.getName(constant_pool);
    } catch (ConstantPoolException e) {
        return report(e);
    }
}