APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.jpackage.internal.log

pack-priv final Class Utils

extends Object
Class Inheritance
Imports
java.io.StringWriter, java.lang.reflect.InvocationHandler, .Method, .Proxy, java.util.Arrays, .List, .Objects, .Set, java.util.function.Consumer, java.util.stream.Collectors, .Stream, jdk.jpackage.internal.model.SelfContainedException, jdk.jpackage.internal.util.function.ExceptionBox

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class

Field Summary

Modifier and TypeField and Description
pack-priv static final Consumer<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T extends Logger> T
pack-priv static boolean
pack-priv static <T extends Logger> T
teeLogger(Class<T> type, List<? extends T> loggers)

pack-priv static String
pack-priv static Consumer<String>
private static Stream<Class<?>>
unfoldInterface(Class<?> interfaceType)

pack-priv static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DISCARDERback to summary
pack-priv static final Consumer<String> DISCARDER

Constructor Detail

Utilsback to summary
private Utils()

Method Detail

discardingLoggerback to summary
pack-priv static <T extends Logger> T discardingLogger(Class<T> type)
Annotations
@SuppressWarnings:unchecked
isSelfContainedback to summary
pack-priv static boolean isSelfContained(Throwable t)
teeLoggerback to summary
pack-priv static <T extends Logger> T teeLogger(Class<T> type, List<? extends T> loggers)
Annotations
@SuppressWarnings:unchecked
toStringback to summary
pack-priv static String toString(Throwable t)
toStringConsumerback to summary
pack-priv static Consumer<String> toStringConsumer(System.Logger logger, System.Logger.Level level)
unfoldInterfaceback to summary
private static Stream<Class<?>> unfoldInterface(Class<?> interfaceType)
writeWithoutTrailingLineSeparatorback to summary
pack-priv static void writeWithoutTrailingLineSeparator(StringWriter writer, Consumer<String> sink)
jdk.jpackage.internal.log back to summary

private abstract Class Utils.LoggerHandler<T extends Logger>

extends Object
implements InvocationHandler
Class Inheritance
All Implemented Interfaces
java.lang.reflect.InvocationHandler

Field Summary

Modifier and TypeField and Description
private final boolean
private final Set<Method>

Constructor Summary

AccessConstructor and Description
protected
LoggerHandler(Class<T> loggerType, boolean loggerEnabled)

Method Summary

Modifier and TypeMethod and Description
public Object
invoke(Object proxy, Method method, Object[] args)

Implements java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result.

protected abstract void
invokeLoggerMethod(Object proxy, Method method, Object[] args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loggerEnabledback to summary
private final boolean loggerEnabled
loggerMethodsback to summary
private final Set<Method> loggerMethods

Constructor Detail

LoggerHandlerback to summary
protected LoggerHandler(Class<T> loggerType, boolean loggerEnabled)

Method Detail

invokeback to summary
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable

Implements java.lang.reflect.InvocationHandler.invoke.

Doc from java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.

Annotations
@Override
Exceptions
Throwable:
the exception to throw from the method invocation on the proxy instance. The exception's type must be assignable either to any of the exception types declared in the throws clause of the invoked method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by this method that is not assignable to any of the exception types declared in the throws clause of the invoked method, then an UndeclaredThrowableException containing the exception that was thrown by this method will be thrown by the method invocation on the proxy instance.
invokeLoggerMethodback to summary
protected abstract void invokeLoggerMethod(Object proxy, Method method, Object[] args) throws Throwable