Java Code Examples for com.sun.java.util.jar.pack.Package.Class#Field

The following examples show how to use com.sun.java.util.jar.pack.Package.Class#Field . 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: PackageWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 2
Source File: PackageWriter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 3
Source File: PackageWriter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 4
Source File: PackageWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 5
Source File: PackageWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 6
Source File: PackageWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 7
Source File: PackageWriter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 8
Source File: PackageWriter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 9
Source File: PackageWriter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 10
Source File: PackageWriter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 11
Source File: PackageWriter.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 12
Source File: PackageWriter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}
 
Example 13
Source File: PackageWriter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
void writeMembers(Class cls) throws IOException {
    List<Class.Field> fields = cls.getFields();
    class_field_count.putInt(fields.size());
    for (Class.Field f : fields) {
        field_descr.putRef(f.getDescriptor());
        writeAttrs(ATTR_CONTEXT_FIELD, f, cls);
    }

    List<Class.Method> methods = cls.getMethods();
    class_method_count.putInt(methods.size());
    for (Class.Method m : methods) {
        method_descr.putRef(m.getDescriptor());
        writeAttrs(ATTR_CONTEXT_METHOD, m, cls);
        assert((m.code != null) == (m.getAttribute(attrCodeEmpty) != null));
        if (m.code != null) {
            writeCodeHeader(m.code);
            writeByteCodes(m.code);
        }
    }
}