Initializes a type

@param name The name of the class
@return The instance of the class. Returns a dummy if the class was not
found.
334172
protected Class<?> classForName(String name) {
        try {
            return resourceLoader.classForName(name);
        } catch (ResourceLoadingException cnfe) {
            return DUMMY_CLASS;
        }
    }
991984
private Class loadClass(final String name) {

		ClassLoader loader = NodeExtender.getClassLoader();
		Class loadedClass  = null;

		if (loader == null) {
			loader = getClass().getClassLoader();
		}

		try {

			loadedClass = Class.forName(name, true, loader);

		} catch (Throwable ignore) {}

		if (loadedClass == null) {

			try {

				loadedClass = Class.forName(name);

			} catch (Throwable ignore) {}
		}

		return loadedClass;
	}
970419
public static JcPrimitive fromType(Class<?> type, String name) {
		// TODO what about dates and arrays
		if (type.equals(String.class))
			return new JcString(name);
		else if (type.equals(Number.class))
			return new JcNumber(name);
		else if (type.equals(Boolean.class))
			return new JcBoolean(name);
		return null;
	}
1270435
public static <T> T newInstance(final String className) {
		try {
			return (T) Thread.currentThread().getContextClassLoader().loadClass(className).newInstance();
		} catch (final Exception e) {
			throw new RuntimeException(e);
		}

	}
106871
public static RepositoryType newInstance(String name)
    {
        RepositoryType type = new RepositoryType();
        type.setName(name);
        return type;
    }
1344743
public ClassDocImpl lookupClass(String name) {
        ClassSymbol c = getClassSymbol(name);
        if (c != null) {
            return getClassDoc(c);
        } else {
            return null;
        }
    }
1368431
public static <T> T newInstance(Class<?> aClass, Object... initargs) 
	throws SetupException
	{
		Class<?>[] parameterTypes = null;
		
		if(initargs != null && initargs.length > 0)
		{
			parameterTypes = new Class<?>[initargs.length];
			
			for (int i = 0; i < initargs.length; i++)
			{
				if(initargs[i] == null)
					continue; //skip
				
				parameterTypes[i] = initargs[i].getClass();
			}
		}
		
		return newInstance(aClass,parameterTypes,initargs);
	}
996626
private final CClassLoader getLoaderByName(final String name) {
		try {

			CClassLoader loader = (CClassLoader) this.childrenMap.get(name);

			if (loader == null) {
				loader = CClassLoader.createLoader(this, name);
				this.childrenMap.put(name, loader);
			}

			return loader;
		} finally {
			try {

			} catch (final Exception ignore) {
			}
		}
	}
482785
protected static Object newInstance(String className) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        log.debug("Conversion utils classloader: {}", cl);
        Object instance = null;
        try {
            Class<?> clazz = cl.loadClass(className);
            instance = clazz.newInstance();
        } catch (Exception ex) {
            log.error("Error loading class: {}", className, ex);
        }
        return instance;
    }
701831
public static int valueFromName(String name) {
        if (name.equals(TYPENAME_SIMPLE_REFERENCE)) {
            return SIMPLE_REFERENCE;
        }
        return javax.jcr.PropertyType.valueFromName(name);
    }
1021464
private Class<?> beanType(String name) {
		Class<?> type = context.getType(name);
		if (ClassUtils.isCglibProxyClass(type)) {
			return AopProxyUtils.ultimateTargetClass(context.getBean(name));
		}
		return type;
	}
719571
public <T> T newInstance (Class<T> type) {
		Registration registration = getRegistration(type);
		ObjectInstantiator instantiator = registration.getInstantiator();
		if (instantiator == null) {
			instantiator = newInstantiator(type);
			registration.setInstantiator(instantiator);
		}
		return (T)instantiator.newInstance();
	}
566315
public Class<?> loadClass(String name) throws ClassNotFoundException {
        while (true) {
            try {
                if (mClassLoader == null) {
                    return Class.forName(name);
                } else {
                    return mClassLoader.loadClass(name);
                }
            } catch (ClassNotFoundException e) {
                int index = name.lastIndexOf('.');
                if (index < 0) {
                    throw e;
                }

                // Search for inner class.
                name = name.substring(0, index) + '$' +
                        name.substring(index + 1);
            }
        }
    }
1347698
protected JClass loadClass(String name)
  {
    try {
      Class cl;

      if (_loader != null)
        cl = Class.forName(name, false, _loader);
      else
        cl = Class.forName(name);

      return new JClassWrapper(cl, this);
    } catch (ClassNotFoundException e) {
      log.log(Level.FINE, e.toString(), e);

      return null;
    }
  }
245107
public static <T> T lookup(String name) {
        InitialContext initialContext = initialContext();
        try {
            @SuppressWarnings("unchecked")
            T object = (T) initialContext.lookup(name);
            if (object == null) {
                throw new NameNotFoundException(name + " was found but is null");
            }
            return object;
        } catch (NameNotFoundException e) {
            throw new IllegalArgumentException(name + " was not found in JNDI", e);
        } catch (NamingException e) {
            throw new IllegalArgumentException("JNDI lookup failed", e);
        } finally {
            closeContext(initialContext);
        }
    }
836786
public static JClass localForName(String name)
  {
    JClassLoaderWrapper jLoader = JClassLoaderWrapper.create();
    
    return jLoader.forName(name);
  }
1332110
@NonNull
  public static CreateTypeStart createType(@NonNull String typeName) {
    return createType(CqlIdentifier.fromCql(typeName));
  }