JDK 11 jdk.jdeps.jmod - JDeps Tool

JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" command.

JDK 11 JDeps tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jdeps.jmod.

JDK 11 JDeps tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 JDeps tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jdeps.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

com/sun/tools/classfile/Attributes.java

/*
 * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package com.sun.tools.classfile;

import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/*
 *  <p><b>This is NOT part of any supported API.
 *  If you write code that depends on this, you do so at your own risk.
 *  This code and its internal interfaces are subject to change or
 *  deletion without notice.</b>
 */
public class Attributes implements Iterable<Attribute> {

    public final Attribute[] attrs;
    public final Map<String, Attribute> map;

    Attributes(ClassReader cr) throws IOException {
        map = new HashMap<>();
        int attrs_count = cr.readUnsignedShort();
        attrs = new Attribute[attrs_count];
        for (int i = 0; i < attrs_count; i++) {
            Attribute attr = Attribute.read(cr);
            attrs[i] = attr;
            try {
                map.put(attr.getName(cr.getConstantPool()), attr);
            } catch (ConstantPoolException e) {
                // don't enter invalid names in map
            }
        }
    }

    public Attributes(ConstantPool constant_pool, Attribute[] attrs) {
        this.attrs = attrs;
        map = new HashMap<>();
        for (Attribute attr : attrs) {
            try {
                map.put(attr.getName(constant_pool), attr);
            } catch (ConstantPoolException e) {
                // don't enter invalid names in map
            }
        }
    }

    public Attributes(Map<String, Attribute> attributes) {
        this.attrs = attributes.values().toArray(new Attribute[attributes.size()]);
        map = attributes;
    }

    public Iterator<Attribute> iterator() {
        return Arrays.asList(attrs).iterator();
    }

    public Attribute get(int index) {
        return attrs[index];
    }

    public Attribute get(String name) {
        return map.get(name);
    }

    public int getIndex(ConstantPool constant_pool, String name) {
        for (int i = 0; i < attrs.length; i++) {
            Attribute attr = attrs[i];
            try {
                if (attr != null && attr.getName(constant_pool).equals(name))
                    return i;
            } catch (ConstantPoolException e) {
                // ignore invalid entries
            }
        }
        return -1;
    }

    public int size() {
        return attrs.length;
    }

    public int byteLength() {
        int length = 2;
        for (Attribute a: attrs)
            length += a.byteLength();
        return length;
    }
}

com/sun/tools/classfile/Attributes.java

 

JDK 11 jdk.jdi.jmod - JDI Tool

JDK 11 jdk.jconsole.jmod - JConsole Tool

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-07-07, 5275👍, 0💬