Java Class Load classForName(String name, ClassLoader classLoader)

Here you can find the source of classForName(String name, ClassLoader classLoader)

Description

class For Name

License

Open Source License

Declaration

public static Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException 

Method Source Code

//package com.java2s;

import java.util.Map;

public class Main {
    private static Map<String, Class<?>> primitiveClassMap;

    public static Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException {
        Class<?> c = primitiveClassMap.get(name);
        if (c == null) {
            c = Class.forName(name, false, classLoader);
        }//  w w w  . j av  a  2s  .  co  m

        return c;
    }
}

Related

  1. classForName(String name)
  2. classForName(String name)
  3. classForName(String name)
  4. classForName(String name)
  5. classForName(String name)
  6. classForName(String str)
  7. classForName(String typeName)
  8. classForName(String typeName)
  9. classForNameNoThrow(String className)