Java Code Examples for

Following code examples demonstrate how to use java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use various code implementation of this class.

    private String getJavaPackage(ModulePackages_attribute attr, int index) {
        try {
            return getJavaName(attr.getPackage(index, constant_pool));
        } catch (ConstantPoolException e) {
            return report(e);

    public Void visitModulePackages(ModulePackages_attribute attr, Void ignore) {
        println("ModulePackages: ");
        for (int i = 0; i < attr.packages_count; i++) {
            print("#" + attr.packages_index[i]);
        return null;

See JVMS, section 4.8.15.

This is NOT part of any supported API. If you write code t

hat depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Read More