Java Class Load loadClass(ClassLoader classLoader, Class clazz, String postfix)

Here you can find the source of loadClass(ClassLoader classLoader, Class clazz, String postfix)

Description

load Class

License

Open Source License

Declaration

protected static Class<?> loadClass(ClassLoader classLoader, Class<?> clazz, String postfix) 

Method Source Code

//package com.java2s;
/**/*www  .j a va 2s . c o  m*/
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

public class Main {
    protected static Class<?> loadClass(ClassLoader classLoader, Class<?> clazz, String postfix) {

        String className = clazz.getName();

        try {
            return Class.forName(className.concat(postfix), false, classLoader);
        } catch (ClassNotFoundException cnfe) {
        }

        return null;
    }
}

Related

  1. loadClass(Class context, String... names)
  2. loadClass(Class sourceClass, final String className)
  3. loadClass(Class base, String name)
  4. loadClass(Class clazz)
  5. loadClass(Class contextClass, String className)
  6. loadClass(ClassLoader classLoader, String className)
  7. loadClass(ClassLoader classLoader, String className)
  8. loadClass(ClassLoader classLoader, String fullyQualifiedClassName)
  9. loadClass(ClassLoader loader, String className)