Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.base.jmod - Base Module
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module.
JDK 11 Base module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.base.jmod.
JDK 11 Base module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Base module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/logger/AbstractLoggerWrapper.java
/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.internal.logger; import java.util.ResourceBundle; import java.util.function.Supplier; import java.lang.System.Logger; import java.lang.System.Logger.Level; import sun.util.logging.PlatformLogger; /** * An implementation of {@link System.Logger System.Logger} * that redirects all calls to a wrapped instance of {@link * System.Logger System.Logger} * * @param <L> Type of the wrapped Logger: {@code Logger} or * an extension of that interface. * */ abstract class AbstractLoggerWrapper<L extends Logger> implements Logger, PlatformLogger.Bridge, PlatformLogger.ConfigurableBridge { AbstractLoggerWrapper() { } abstract L wrapped(); abstract PlatformLogger.Bridge platformProxy(); L getWrapped() { return wrapped(); } @Override public final String getName() { return wrapped().getName(); } // ----------------------------------------------------------------- // Generic methods taking a Level as parameter // ----------------------------------------------------------------- @Override public boolean isLoggable(Level level) { return wrapped().isLoggable(level); } @Override public void log(Level level, String msg) { wrapped().log(level, msg); } @Override public void log(Level level, Supplier<String> msgSupplier) { wrapped().log(level, msgSupplier); } @Override public void log(Level level, Object obj) { wrapped().log(level, obj); } @Override public void log(Level level, String msg, Throwable thrown) { wrapped().log(level, msg, thrown); } @Override public void log(Level level, Supplier<String> msgSupplier, Throwable thrown) { wrapped().log(level, msgSupplier, thrown); } @Override public void log(Level level, String format, Object... params) { wrapped().log(level, format, params); } @Override public void log(Level level, ResourceBundle bundle, String key, Throwable thrown) { wrapped().log(level, bundle, key, thrown); } @Override public void log(Level level, ResourceBundle bundle, String format, Object... params) { wrapped().log(level, bundle, format, params); } // --------------------------------------------------------- // Methods from PlatformLogger.Bridge // --------------------------------------------------------- @Override public boolean isLoggable(PlatformLogger.Level level) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) return isLoggable(level.systemLevel()); else return platformProxy.isLoggable(level); } @Override public boolean isEnabled() { final PlatformLogger.Bridge platformProxy = platformProxy(); return platformProxy == null || platformProxy.isEnabled(); } @Override public void log(PlatformLogger.Level level, String msg) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(), msg); } else { platformProxy.log(level, msg); } } @Override public void log(PlatformLogger.Level level, String msg, Throwable thrown) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(), msg, thrown); } else { platformProxy.log(level, msg, thrown); } } @Override public void log(PlatformLogger.Level level, String msg, Object... params) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(), msg, params); } else { platformProxy.log(level, msg, params); } } @Override public void log(PlatformLogger.Level level, Supplier<String> msgSupplier) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(),msgSupplier); } else { platformProxy.log(level,msgSupplier); } } @Override public void log(PlatformLogger.Level level, Throwable thrown, Supplier<String> msgSupplier) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(), msgSupplier, thrown); } else { platformProxy.log(level, thrown, msgSupplier); } } @Override public void logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, String msg) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { if (sourceClass == null && sourceMethod == null) { // best effort wrapped().log(level.systemLevel(), msg); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { sourceClass = sourceClass == null ? "" : sourceClass; sourceMethod = sourceMethod == null ? "" : sourceMethod; msg = msg == null ? "" : msg; wrapped.log(systemLevel, String.format("[%s %s] %s", sourceClass, sourceMethod, msg)); } } } else { platformProxy.logp(level, sourceClass, sourceMethod, msg); } } @Override public void logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, Supplier<String> msgSupplier) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { // best effort if (sourceClass == null && sourceMethod == null) { wrapped().log(level.systemLevel(), msgSupplier); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { final String sClass = sourceClass == null ? "" : sourceClass; final String sMethod = sourceMethod == null ? "" : sourceMethod; wrapped.log(systemLevel, () -> String.format("[%s %s] %s", sClass, sMethod, msgSupplier.get())); } } } else { platformProxy.logp(level, sourceClass, sourceMethod, msgSupplier); } } @Override public void logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, String msg, Object... params) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { // best effort if (sourceClass == null && sourceMethod == null) { wrapped().log(level.systemLevel(), msg, params); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { sourceClass = sourceClass == null ? "" : sourceClass; sourceMethod = sourceMethod == null ? "" : sourceMethod; msg = msg == null ? "" : msg; wrapped.log(systemLevel, String.format("[%s %s] %s", sourceClass, sourceMethod, msg), params); } } } else { platformProxy.logp(level, sourceClass, sourceMethod, msg, params); } } @Override public void logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { // best effort if (sourceClass == null && sourceMethod == null) { wrapped().log(level.systemLevel(), msg, thrown); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { sourceClass = sourceClass == null ? "" : sourceClass; sourceMethod = sourceMethod == null ? "" : sourceMethod; msg = msg == null ? "" : msg; wrapped.log(systemLevel, String.format("[%s %s] %s", sourceClass, sourceMethod, msg), thrown); } } } else { platformProxy.logp(level, sourceClass, sourceMethod, msg, thrown); } } @Override public void logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, Throwable thrown, Supplier<String> msgSupplier) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { // best effort if (sourceClass == null && sourceMethod == null) { wrapped().log(level.systemLevel(), msgSupplier, thrown); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { final String sClass = sourceClass == null ? "" : sourceClass; final String sMethod = sourceMethod == null ? "" : sourceMethod; wrapped.log(systemLevel, () -> String.format("[%s %s] %s", sClass, sMethod, msgSupplier.get()), thrown); } } } else { platformProxy.logp(level, sourceClass, sourceMethod, thrown, msgSupplier); } } @Override public void logrb(PlatformLogger.Level level, String sourceClass, String sourceMethod, ResourceBundle bundle, String msg, Object... params) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { // best effort if (bundle != null || sourceClass == null && sourceMethod == null) { wrapped().log(level.systemLevel(), bundle, msg, params); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { sourceClass = sourceClass == null ? "" : sourceClass; sourceMethod = sourceMethod == null ? "" : sourceMethod; msg = msg == null ? "" : msg; wrapped.log(systemLevel, bundle, String.format("[%s %s] %s", sourceClass, sourceMethod, msg), params); } } } else { platformProxy.logrb(level, sourceClass, sourceMethod, bundle, msg, params); } } @Override public void logrb(PlatformLogger.Level level, String sourceClass, String sourceMethod, ResourceBundle bundle, String msg, Throwable thrown) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { // best effort if (bundle != null || sourceClass == null && sourceMethod == null) { wrapped().log(level.systemLevel(), bundle, msg, thrown); } else { Level systemLevel = level.systemLevel(); Logger wrapped = wrapped(); if (wrapped.isLoggable(systemLevel)) { sourceClass = sourceClass == null ? "" : sourceClass; sourceMethod = sourceMethod == null ? "" : sourceMethod; msg = msg == null ? "" : msg; wrapped.log(systemLevel, bundle, String.format("[%s %s] %s", sourceClass, sourceMethod, msg), thrown); } } } else { platformProxy.logrb(level, sourceClass, sourceMethod, bundle, msg, thrown); } } @Override public void logrb(PlatformLogger.Level level, ResourceBundle bundle, String msg, Throwable thrown) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(), bundle, msg, thrown); } else { platformProxy.logrb(level, bundle, msg, thrown); } } @Override public void logrb(PlatformLogger.Level level, ResourceBundle bundle, String msg, Object... params) { final PlatformLogger.Bridge platformProxy = platformProxy(); if (platformProxy == null) { wrapped().log(level.systemLevel(), bundle, msg, params); } else { platformProxy.logrb(level, bundle, msg, params); } } @Override public LoggerConfiguration getLoggerConfiguration() { final PlatformLogger.Bridge platformProxy = platformProxy(); return platformProxy == null ? null : PlatformLogger.ConfigurableBridge .getLoggerConfiguration(platformProxy); } }
⏎ jdk/internal/logger/AbstractLoggerWrapper.java
Or download all of them as a single archive file:
File name: java.base-11.0.1-src.zip File size: 8740354 bytes Release date: 2018-11-04 Download
2020-05-29, 206330👍, 0💬
Popular Posts:
Commons Pool provides an Object-pooling API, with three major aspects: 1. A generic object pool inte...
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...
What Is poi-3.5.jar - Part 2? poi-3.5.jar is one of the JAR files for Apache POI 3.5, which provides...