All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.javaagent.bootstrap.BootstrapPackagePrefixesHolder Maven / Gradle / Ivy

The newest version!
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.javaagent.bootstrap;

import java.util.Collections;
import java.util.List;

/**
 * {@link BootstrapPackagePrefixesHolder} is an utility class that holds package prefixes. The
 * classes from these packages are pushed to the bootstrap class loader.
 *
 * 

The prefixes are loaded by {@code AgentInstaller} and consumed by class loader * instrumentation. The instrumentation does not have access to the installer, therefore this * utility class is used to share package prefixes. */ public final class BootstrapPackagePrefixesHolder { private static volatile List bootstrapPackagePrefixes; public static List getBoostrapPackagePrefixes() { return bootstrapPackagePrefixes; } public static void setBoostrapPackagePrefixes(List prefixes) { if (bootstrapPackagePrefixes != null) { // Only possible by misuse of this API, just ignore. return; } bootstrapPackagePrefixes = Collections.unmodifiableList(prefixes); } private BootstrapPackagePrefixesHolder() {} }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy