- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for getClasspathForClass (0.28 sec)
-
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/classloader/ClasspathUtil.java
} }.visit(classLoader); } public static File getClasspathForClass(String targetClassName) { try { Class<?> clazz = Class.forName(targetClassName); if (clazz.getClassLoader() == null) { return null; } else { return getClasspathForClass(Class.forName(targetClassName)); } } catch (ClassNotFoundException e) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 7.2K bytes - Viewed (0) -
platforms/jvm/language-groovy/src/test/groovy/org/gradle/api/internal/tasks/compile/GroovyCompileTransformingClassLoaderTest.groovy
GroovyCompileTransformingClassLoader loader Class<?> classAnnotation def setup() { def classPath = DefaultClassPath.of(ClasspathUtil.getClasspathForClass(getClass()), ClasspathUtil.getClasspathForClass(GroovyASTTransformationClass)) loader = new GroovyCompileTransformingClassLoader(null, classPath) classAnnotation = loader.loadClass(GroovyASTTransformationClass.name) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Aug 28 11:40:18 UTC 2023 - 3.5K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/classloader/DefaultClassLoaderFactoryTest.groovy
c.getConstructor().newInstance().doStuff() then: notThrown() } def getClasspath() { return DefaultClassPath.of(ClasspathUtil.getClasspathForClass(DefaultClassLoaderFactoryTestHelper)) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 2.5K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/classloader/DefaultClassLoaderFactory.java
import javax.xml.parsers.SAXParserFactory; import java.io.File; import java.util.Collections; import static java.lang.ClassLoader.getSystemClassLoader; import static org.gradle.internal.classloader.ClasspathUtil.getClasspathForClass; import static org.gradle.internal.classloader.ClasspathUtil.getClasspathForResource; public class DefaultClassLoaderFactory implements ClassLoaderFactory {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 5.3K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/classloader/ClassLoaderUtilsTest.groovy
class ClassLoaderUtilsTest extends Specification { def 'can inject classes to a classloader'() { given: Class testClass = DefaultClassLoaderFactoryTestHelper File classpath = ClasspathUtil.getClasspathForClass(testClass) File classFile = new File(classpath, testClass.name.replace('.', '/') + '.class') byte[] bytes = Files.readAllBytes(classFile.toPath()) MyClassLoader myClassLoader = new MyClassLoader()
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 1.4K bytes - Viewed (0) -
platforms/core-runtime/build-process-services/src/main/java/org/gradle/internal/installation/CurrentGradleInstallationLocator.java
} else { return new CurrentGradleInstallation(new GradleInstallation(dir)); } } private static File findDistDir(Class<?> clazz) { File codeSource = ClasspathUtil.getClasspathForClass(clazz); if (codeSource.isFile()) { return determineDistRootDir(codeSource); } else { // Loaded from a classes dir - assume we're running from the ide or tests
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri May 24 06:16:07 UTC 2024 - 3.2K bytes - Viewed (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/Docbook2Xhtml.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 05 19:36:14 UTC 2023 - 4.7K bytes - Viewed (0) -
platforms/ide/tooling-api/src/testFixtures/groovy/org/gradle/integtests/tooling/fixture/ToolingApiClassLoaderProvider.groovy
static ClassLoader getToolingApiClassLoader(ToolingApiDistribution toolingApi, Class<?> target) { def testClassPath = [ToolingApiSpecification, target] .collect { ClasspathUtil.getClasspathForClass(it) } testClassPath.addAll(collectAdditionalClasspath(toolingApi, target)) getTestClassLoader(toolingApi, testClassPath) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Nov 21 09:28:30 UTC 2023 - 5K bytes - Viewed (0) -
platforms/ide/tooling-api/src/integTest/groovy/org/gradle/integtests/tooling/AutoTestedSamplesToolingApiTest.groovy
fileManager.setLocation(location, [temp.testDirectory]); location = ("javax.tools.StandardLocation" as Class).CLASS_PATH fileManager.setLocation(location, [ClasspathUtil.getClasspathForClass(Element)]); def checkDiagnostic = { diagnostic -> if (diagnostic.kind.name() == 'ERROR') { String[] lines = source.split("\n") int lineNo = diagnostic.lineNumber - 1
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Sep 26 14:49:20 UTC 2023 - 3.5K bytes - Viewed (0) -
platforms/core-runtime/daemon-protocol/src/testFixtures/groovy/org/gradle/tooling/internal/provider/AbstractClassGraphSpec.groovy
/** * Returns the classpath for the given classes. */ List<File> originalClassPath(Class<?>... classes) { return classes.collect { ClasspathUtil.getClasspathForClass(it) } } /** * Makes a copy of the given classes and returns the classpath for these copies. Each class is added to its own classpath root. */
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue May 14 00:13:09 UTC 2024 - 3.5K bytes - Viewed (0)