JDK 11 jdk.jcmd.jmod - JCmd Tool

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

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

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

JDK 11 JCmd source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jcmd.

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

✍: FYIcenter

sun/tools/jstat/OptionFormat.java

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

package sun.tools.jstat;

import java.util.*;
import sun.jvmstat.monitor.MonitorException;

/**
 * A class for describing the output format specified by a command
 * line option that was parsed from an option description file.
 *
 * @author Brian Doherty
 * @since 1.5
 */
public class OptionFormat {
    protected String name;
    protected List<OptionFormat> children;

    public OptionFormat(String name) {
        this.name = name;
        this.children = new ArrayList<OptionFormat>();
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof OptionFormat)) {
            return false;
        }
        OptionFormat of = (OptionFormat)o;
        return (this.name.compareTo(of.name) == 0);
    }

    public int hashCode() {
      return name.hashCode();
    }

    public void addSubFormat(OptionFormat f) {
        children.add(f);
    }

    public OptionFormat getSubFormat(int index) {
        return children.get(index);
    }

    public void insertSubFormat(int index, OptionFormat f) {
        children.add(index, f);
    }

    public String getName() {
        return name;
    }

    public void apply(Closure c) throws MonitorException {

      for (Iterator<OptionFormat> i = children.iterator(); i.hasNext(); /* empty */) {
          OptionFormat o = i.next();
          c.visit(o, i.hasNext());
      }

      for (Iterator <OptionFormat>i = children.iterator(); i.hasNext(); /* empty */) {
          OptionFormat o = i.next();
          o.apply(c);
      }
    }

    public void printFormat() {
        printFormat(0);
    }

    public void printFormat(int indentLevel) {
        String indentAmount = "  ";
        StringBuilder indent = new StringBuilder("");

        for (int j = 0; j < indentLevel; j++) {
            indent.append(indentAmount);
        }
        System.out.println(indent + name + " {");

        // iterate over all children and call their printFormat() methods
        for (OptionFormat of : children) {
            of.printFormat(indentLevel+1);
        }
        System.out.println(indent + "}");
    }
}

sun/tools/jstat/OptionFormat.java

 

Or download all of them as a single archive file:

File name: jdk.jcmd-11.0.1-src.zip
File size: 47892 bytes
Release date: 2018-11-04
Download 

 

JDK 11 jdk.jconsole.jmod - JConsole Tool

JDK 11 jdk.javadoc.jmod - Java Document Tool

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-07-07, 13777👍, 0💬