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/Token.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.io.StreamTokenizer;

/**
 * A class for encapsulating tokens returned from StreamTokenizer primarily
 * for output formatting purposes.
 *
 * @author Brian Doherty
 * @since 1.5
 */
public class Token {
    public String sval;
    public double nval;
    public int ttype;

    public Token(int ttype, String sval, double nval) {
        this.ttype = ttype;
        this.sval = sval;
        this.nval = nval;
    }

    public Token(int ttype, String sval) {
        this(ttype, sval, 0);
    }

    public Token(int ttype) {
        this(ttype, null, 0);
    }

    public String toMessage() {
        switch(ttype) {
        case StreamTokenizer.TT_EOL:
            return "\"EOL\"";
        case StreamTokenizer.TT_EOF:
            return "\"EOF\"";
        case StreamTokenizer.TT_NUMBER:
            return "NUMBER";
        case StreamTokenizer.TT_WORD:
            if (sval == null) {
                return "IDENTIFIER";
            } else {
                return "IDENTIFIER " + sval;
            }
        default:
            if (ttype == (int)'"') {
                String msg = "QUOTED STRING";
                if (sval != null)
                    msg = msg + " \"" + sval + "\"";
                return msg;
            } else {
                return "CHARACTER \'" + (char)ttype + "\'";
            }
        }
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        switch(ttype) {
        case StreamTokenizer.TT_EOL:
            sb.append("ttype=TT_EOL");
            break;
        case StreamTokenizer.TT_EOF:
            sb.append("ttype=TT_EOF");
            break;
        case StreamTokenizer.TT_NUMBER:
            sb.append("ttype=TT_NUM,").append("nval="+nval);
            break;
        case StreamTokenizer.TT_WORD:
            if (sval == null) {
                sb.append("ttype=TT_WORD:IDENTIFIER");
            } else {
                sb.append("ttype=TT_WORD:").append("sval="+sval);
            }
            break;
        default:
            if (ttype == (int)'"') {
                sb.append("ttype=TT_STRING:").append("sval="+sval);
            } else {
                sb.append("ttype=TT_CHAR:").append((char)ttype);
            }
            break;
        }
        return sb.toString();
    }
}

sun/tools/jstat/Token.java

 

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, 4657👍, 0💬