JDK 11 jdk.compiler.jmod - Compiler Tool

JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "javac" command.

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

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

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

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

✍: FYIcenter

com/sun/tools/javac/util/Assert.java

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

package com.sun.tools.javac.util;

import java.util.function.Supplier;

/**
 * Simple facility for unconditional assertions.
 * The methods in this class are described in terms of equivalent assert
 * statements, assuming that assertions have been enabled.
 *
 *  <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 Assert {
    /** Equivalent to
     *   assert cond;
     */
    public static void check(boolean cond) {
        if (!cond)
            error();
    }

    /** Equivalent to
     *   assert (o == null);
     */
    public static void checkNull(Object o) {
        if (o != null)
            error();
    }

    /** Equivalent to
     *   assert (t != null); return t;
     */
    public static <T> T checkNonNull(T t) {
        if (t == null)
            error();
        return t;
    }

    /** Equivalent to
     *   assert cond : value;
     */
    public static void check(boolean cond, int value) {
        if (!cond)
            error(String.valueOf(value));
    }

    /** Equivalent to
     *   assert cond : value;
     */
    public static void check(boolean cond, long value) {
        if (!cond)
            error(String.valueOf(value));
    }

    /** Equivalent to
     *   assert cond : value;
     */
    public static void check(boolean cond, Object value) {
        if (!cond)
            error(String.valueOf(value));
    }

    /** Equivalent to
     *   assert cond : msg;
     */
    public static void check(boolean cond, String msg) {
        if (!cond)
            error(msg);
    }

    /** Equivalent to
     *   assert cond : msg.get();
     *  Note: message string is computed lazily.
     */
    public static void check(boolean cond, Supplier<String> msg) {
        if (!cond)
            error(msg.get());
    }

    /** Equivalent to
     *   assert (o == null) : value;
     */
    public static void checkNull(Object o, Object value) {
        if (o != null)
            error(String.valueOf(value));
    }

    /** Equivalent to
     *   assert (o == null) : msg;
     */
    public static void checkNull(Object o, String msg) {
        if (o != null)
            error(msg);
    }

    /** Equivalent to
     *   assert (o == null) : msg.get();
     *  Note: message string is computed lazily.
     */
    public static void checkNull(Object o, Supplier<String> msg) {
        if (o != null)
            error(msg.get());
    }

    /** Equivalent to
     *   assert (o != null) : msg;
     */
    public static <T> T checkNonNull(T t, String msg) {
        if (t == null)
            error(msg);
        return t;
    }

    /** Equivalent to
     *   assert (o != null) : msg.get();
     *  Note: message string is computed lazily.
     */
    public static <T> T checkNonNull(T t, Supplier<String> msg) {
        if (t == null)
            error(msg.get());
        return t;
    }

    /** Equivalent to
     *   assert false;
     */
    public static void error() {
        throw new AssertionError();
    }

    /** Equivalent to
     *   assert false : msg;
     */
    public static void error(String msg) {
        throw new AssertionError(msg);
    }

    /** Prevent instantiation. */
    private Assert() { }
}

com/sun/tools/javac/util/Assert.java

 

JDK 11 jdk.crypto.cryptoki.jmod - Crypto KI Module

JDK 11 jdk.charsets.jmod - Charsets Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2018-11-09, 8095👍, 0💬