com.newrelic.weave.utils.ClassLoaderFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of newrelic-weaver Show documentation
Show all versions of newrelic-weaver Show documentation
The Weaver of the Java agent.
/*
*
* * Copyright 2020 New Relic Corporation. All rights reserved.
* * SPDX-License-Identifier: Apache-2.0
*
*/
package com.newrelic.weave.utils;
import java.net.URL;
/**
* A {@link ClassFinder} that finds class URLs using a {@link ClassLoader}.
*/
public class ClassLoaderFinder implements ClassFinder {
private final ClassLoader classLoader;
public ClassLoaderFinder(ClassLoader classLoader) {
this.classLoader = classLoader;
}
@Override
public URL findResource(String internalName) {
return classLoader.getResource(WeaveUtils.getClassResourceName(internalName));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy