Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for URLClassLoader (0.09 sec)

  1. src/test/java/org/codelibs/core/lang/ClassLoaderIteratorTest.java

    import static org.junit.Assert.assertThat;
    
    import java.net.URL;
    import java.net.URLClassLoader;
    
    import org.junit.Test;
    
    /**
     * @author koichik
     */
    public class ClassLoaderIteratorTest {
    
        /**
         * @throws Exception
         */
        @Test
        public void test() throws Exception {
            final ClassLoader cl1 = new URLClassLoader(new URL[] { new URL("file:/foo") }, null);
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/reflect/ClassPathTest.java

      public void testClassPathEntries_urlClassLoader_withParent() throws Exception {
        URL url1 = new URL("file:/a");
        URL url2 = new URL("file:/b");
        URLClassLoader parent = new URLClassLoader(new URL[] {url1}, null);
        URLClassLoader child = new URLClassLoader(new URL[] {url2}, parent) {};
        assertThat(ClassPath.getClassPathEntries(child))
            .containsExactly(new File("/a"), parent, new File("/b"), child)
            .inOrder();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 22:09:38 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/lang/ClassLoaderUtilTest.java

         */
        @Test
        public void testIsAncestor() throws Exception {
            final ClassLoader cl1 = new URLClassLoader(new URL[] { new URL("file:/foo") }, null);
            final ClassLoader cl2 = new URLClassLoader(new URL[] { new URL("file:/bar") }, cl1);
            final ClassLoader cl3 = new URLClassLoader(new URL[] { new URL("file:/baz") }, cl2);
    
            assertThat(ClassLoaderUtil.isAncestor(cl3, cl2), is(true));
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java

        URLClassLoader sepLoader = new URLClassLoader(getClassPathUrls(), myLoader.getParent());
        // sepLoader is the loader that we will use to load the parallel FinalizableReferenceQueue (FRQ)
        // and friends, and that we will eventually expect to see garbage-collected. The assumption
        // is that the ClassLoader of this test is a URLClassLoader, and that it loads FRQ itself
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/EnumsTest.java

      // cleared.
      @J2ktIncompatible
      @GwtIncompatible // weak references
      private WeakReference<?> doTestClassUnloading() throws Exception {
        URLClassLoader shadowLoader = new URLClassLoader(getClassPathUrls(), null);
        @SuppressWarnings("unchecked")
        Class<TestEnum> shadowTestEnum =
            (Class<TestEnum>) Class.forName(TestEnum.class.getName(), false, shadowLoader);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

      public void testClassPathEntries_urlClassLoader_withParent() throws Exception {
        URL url1 = new URL("file:/a");
        URL url2 = new URL("file:/b");
        URLClassLoader parent = new URLClassLoader(new URL[] {url1}, null);
        URLClassLoader child = new URLClassLoader(new URL[] {url2}, parent) {};
        assertThat(ClassPath.getClassPathEntries(child))
            .containsExactly(new File("/a"), parent, new File("/b"), child)
            .inOrder();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 22:09:38 UTC 2024
    - 25K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/ResourcesTest.java

        // Now set the context loader to one that should find the resource.
        URL baseUrl = tempFile.getParentFile().toURI().toURL();
        URLClassLoader loader = new URLClassLoader(new URL[] {baseUrl});
        ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader();
        try {
          Thread.currentThread().setContextClassLoader(loader);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/io/ResourceUtilTest.java

            assertEquals(file, file2);
            final File junitJar = ResourceUtil.getBuildDir(TestCase.class);
            assertTrue(junitJar.exists());
            final URL url = junitJar.toURI().toURL();
            final URLClassLoader loader = new URLClassLoader(new URL[] { url });
            loader.loadClass(TestCase.class.getName());
        }
    
        /**
         * @throws Exception
         */
        public void testIsExist() throws Exception {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

    import com.google.common.base.internal.Finalizer;
    import com.google.common.testing.GcFinalization;
    import java.lang.ref.ReferenceQueue;
    import java.lang.ref.WeakReference;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.Arrays;
    import java.util.Collections;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit test for {@link FinalizableReferenceQueue}.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/ResourcesTest.java

        // Now set the context loader to one that should find the resource.
        URL baseUrl = tempFile.getParentFile().toURI().toURL();
        URLClassLoader loader = new URLClassLoader(new URL[] {baseUrl});
        ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader();
        try {
          Thread.currentThread().setContextClassLoader(loader);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top