Java Class Load loadClass(final String className)

Here you can find the source of loadClass(final String className)

Description

load Class

License

Apache License

Declaration

@SuppressWarnings({ "unchecked" })
    public static <T> Class<T> loadClass(final String className) 

Method Source Code

//package com.java2s;
//   Licensed under the Apache License, Version 2.0 (the "License");            //

public class Main {
    @SuppressWarnings({ "unchecked" })
    public static <T> Class<T> loadClass(final String className) {
        try {/*from ww  w  . j av  a  2s  .  com*/
            return (Class<T>) Thread.currentThread().getContextClassLoader().loadClass(className);
        } catch (ClassNotFoundException e) {
            throw new IllegalArgumentException("Unable to load class " + className);
        }
    }
}

Related

  1. loadClass(final ClassLoader cl, final String cname)
  2. loadClass(final ClassLoader classLoader, final String classname)
  3. loadClass(final String className)
  4. loadClass(final String className)
  5. loadClass(final String className)
  6. loadClass(final String className)
  7. loadClass(final String className, final ClassLoader classLoader)
  8. loadClass(final String className, final ClassLoader classLoader)
  9. loadClass(final String clazz)