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

io.opentelemetry.javaagent.tooling.muzzle.HelperResourceBuilderImpl Maven / Gradle / Ivy

There is a newer version: 2.12.0-alpha
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.javaagent.tooling.muzzle;

import io.opentelemetry.javaagent.extension.instrumentation.HelperResourceBuilder;
import java.util.ArrayList;
import java.util.List;

public class HelperResourceBuilderImpl implements HelperResourceBuilder {

  private final List resources = new ArrayList<>();

  @Override
  public void register(String applicationResourcePath, String agentResourcePath) {
    resources.add(
        HelperResource.create(
            applicationResourcePath, agentResourcePath, /* allClassLoaders= */ false));
  }

  @Override
  public void registerForAllClassLoaders(String applicationResourcePath, String agentResourcePath) {
    resources.add(
        HelperResource.create(
            applicationResourcePath, agentResourcePath, /* allClassLoaders= */ true));
  }

  public List getResources() {
    return resources;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy