Java Class Load loadClass(Class clazz)

Here you can find the source of loadClass(Class clazz)

Description

load Class

License

Open Source License

Declaration

public static void loadClass(Class<?> clazz) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2014 Andre L. Santos.//from ww w.  j  a v a2  s. co  m
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Andre L Santos - developer
 ******************************************************************************/

public class Main {
    public static void loadClass(Class<?> clazz) {
        loadClass(clazz.getName());
    }

    public static void loadClass(String fullClassName) {
        try {
            Class.forName(fullClassName);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. getClassNameRepresentation(String name)
  2. getClassNames( StackTraceElement[] currentStack)
  3. loadClass(Class context, String... names)
  4. loadClass(Class sourceClass, final String className)
  5. loadClass(Class base, String name)
  6. loadClass(Class contextClass, String className)
  7. loadClass(ClassLoader classLoader, Class clazz, String postfix)
  8. loadClass(ClassLoader classLoader, String className)
  9. loadClass(ClassLoader classLoader, String className)