Example usage for org.apache.commons.bcel6.util SyntheticRepository loadClass

List of usage examples for org.apache.commons.bcel6.util SyntheticRepository loadClass

Introduction

In this page you can find the example usage for org.apache.commons.bcel6.util SyntheticRepository loadClass.

Prototype

public JavaClass loadClass(Class<?> clazz) throws ClassNotFoundException 

Source Link

Document

Find the JavaClass object for a runtime Class object.

Usage

From source file:ru.objective.jni.utils.OJNIClassLoader.java

public JavaClass loadClass(String className) {
    className = Utils.getDottedClassName(Utils.getBasicType(className));

    JavaClass found = null;/*from   www  . j a  v a 2  s  .c o  m*/

    try {
        found = systemRepository.loadClass(className);
    } catch (Exception e) {
    }

    if (found == null) {
        for (SyntheticRepository repository : cpRepositories) {
            try {
                found = repository.loadClass(className);

                if (found != null) {
                    break;
                }
            } catch (Exception e) {
            }
        }
    }

    return found;
}