Java Class Loader toString(ClassLoader loader)

Here you can find the source of toString(ClassLoader loader)

Description

to String

License

LGPL

Declaration

public static String toString(ClassLoader loader) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.net.URLClassLoader;
import java.util.Arrays;

public class Main {
    public static String toString(ClassLoader loader) {
        if (loader instanceof URLClassLoader) {
            URLClassLoader ul = (URLClassLoader) loader;
            return "URLClassLoader" + Arrays.asList(ul.getURLs()).toString();
        }//w w w  .  j  a v a2s  .co m
        return String.valueOf(loader);
    }
}

Related

  1. readBytecodeForClass(ClassLoader loader, String className, boolean mustExist)
  2. resolveClientClassLoader(Map env)
  3. resolveServerClassLoader(Map env, MBeanServer mbs)
  4. scanPackage(ClassLoader classLoader, Package pkg)
  5. toInputStream(String name, ClassLoader cl)