Java Class Load classForName(final String clsName)

Here you can find the source of classForName(final String clsName)

Description

class For Name

License

Open Source License

Declaration

public static Class<?> classForName(final String clsName) throws ClassNotFoundException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static Class<?> classForName(final String clsName) throws ClassNotFoundException {
        if ("int".equals(clsName))
            return int.class;
        if ("boolean".equals(clsName))
            return boolean.class;
        return Class.forName(clsName);
    }//  w  w  w .ja v  a 2s  . c  o  m
}

Related

  1. classForName(final String className)
  2. classForName(final String theClassName)
  3. classForName(String className)
  4. classForName(String className)
  5. ClassForName(String className)