List of utility methods to do Class Load
Class> | classForName(String name) class For Name Class<?> clazz = null; try { clazz = Class.forName(name); } catch (ClassNotFoundException e) { return clazz; |
Class> | classForName(String name) Get a class for its name. if (name.equals("boolean")) return boolean.class; else if (name.equals("byte")) return byte.class; else if (name.equals("short")) return short.class; else if (name.equals("char")) return char.class; ... |
Class | classForName(String name) Loads class for name. Class c = (Class) primitiveTypes.get(name); if (c == null) c = Class.forName(name); return c; |
Class | classForName(String name) Load the class with the specified name. try { return Thread.currentThread().getContextClassLoader().loadClass(name); } catch (Exception e) { return Class.forName(name); |
Class | classForName(String name) class For Name try { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if (contextClassLoader != null) { return contextClassLoader.loadClass(name); } catch (Throwable ignore) { return Class.forName(name); ... |
Class> | classForName(String name) copied here from ObjectUtil to make the package org.jacorb.test.common independent from the orb core if (name == null) { throw new IllegalArgumentException("Class name must not be null!"); try { return Thread.currentThread().getContextClassLoader().loadClass(name); } catch (Exception e) { return Class.forName(name); |
Class | classForName(String name) Perform resolution of a class name. try { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if (contextClassLoader != null) { return contextClassLoader.loadClass(name); } catch (Throwable ignore) { return Class.forName(name); ... |
Class | classForName(String name) Gets the class for the given name Class rs = Class.forName(name);
return rs;
|
Class> | classForName(String name, ClassLoader classLoader) class For Name Class<?> c = primitiveClassMap.get(name); if (c == null) { c = Class.forName(name, false, classLoader); return c; |
Class | classForName(String str) Gets the Class instance from str . if (str.equals("byte")) return Byte.TYPE; if (str.equals("short")) return Short.TYPE; if (str.equals("char")) return Character.TYPE; if (str.equals("int")) return Integer.TYPE; ... |