JDK 17 jdk.internal.le.jmod - Internal Line Editing Module

JDK 17 jdk.internal.le.jmod is the JMOD file for JDK 17 Internal Line Editing module.

JDK 17 Internal Line Editing module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.internal.le.jmod.

JDK 17 Internal Line Editing module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.

JDK 17 Internal Line Editing module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.internal.le.

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

✍: FYIcenter

jdk/internal/org/jline/reader/impl/SimpleMaskingCallback.java

/*
 * Copyright (c) 2002-2017, the original author or authors.
 *
 * This software is distributable under the BSD license. See the terms of the
 * BSD license in the documentation provided with this software.
 *
 * https://opensource.org/licenses/BSD-3-Clause
 */
package jdk.internal.org.jline.reader.impl;

import jdk.internal.org.jline.reader.MaskingCallback;

import java.util.Objects;

/**
 * Simple {@link MaskingCallback} that will replace all the characters in the line with the given mask.
 * If the given mask is equal to {@link LineReaderImpl#NULL_MASK} then the line will be replaced with an empty String.
 */
public final class SimpleMaskingCallback implements MaskingCallback {
    private final Character mask;

    public SimpleMaskingCallback(Character mask) {
        this.mask = Objects.requireNonNull(mask, "mask must be a non null character");
    }

    @Override
    public String display(String line) {
        if (mask.equals(LineReaderImpl.NULL_MASK)) {
            return "";
        } else {
            StringBuilder sb = new StringBuilder(line.length());
            for (int i = line.length(); i-- > 0;) {
                sb.append((char) mask);
            }
            return sb.toString();
        }
    }

    @Override
    public String history(String line) {
        return null;
    }

}

jdk/internal/org/jline/reader/impl/SimpleMaskingCallback.java

 

Or download all of them as a single archive file:

File name: jdk.internal.le-17.0.5-src.zip
File size: 231458 bytes
Release date: 2022-09-13
Download 

 

JDK 17 jdk.internal.opt.jmod - Internal Opt Module

JDK 17 jdk.internal.jvmstat.jmod - Internal JVM Stat Module

JDK 17 JMod/Module Files

⇑⇑ FAQ for JDK (Java Development Kit) 17

2023-08-25, 4001👍, 0💬