Java Class Load classForName(String columnType)

Here you can find the source of classForName(String columnType)

Description

class For Name

License

Open Source License

Declaration

protected static Class classForName(String columnType) 

Method Source Code

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

import java.util.HashMap;

public class Main {
    protected static HashMap<String, Class> loadedClasses = new HashMap<String, Class>();

    protected static Class classForName(String columnType) {
        try {/*from w  w w  .  ja  v  a  2s . c  om*/
            Class c = loadedClasses.get(columnType);
            if (c == null) {
                c = Class.forName(columnType);
                loadedClasses.put(columnType, c);
            }
            return c;
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. classForName(String className, Class caller)
  2. classForName(String className, Class superClass)
  3. classForName(String className, ClassLoader classLoader)
  4. classForName(String clazzName, ClassLoader classLoader)
  5. classForName(String cname)
  6. classForName(String listener)
  7. classForName(String name)
  8. classForName(String name)
  9. classForName(String name)