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

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

Introduction

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

Prototype

public ClassPath getClassPath() 

Source Link

Document

ClassPath associated with the Repository.

Usage

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

public HashSet<String> getClassNamesSetFromPackage(String packageName) throws IOException {
    HashSet<String> result = new HashSet<>();

    Pattern pattern = Pattern.compile(packageName + ".*.class");

    final Collection<String> systemList = ResourceList.getResources(systemRepository.getClassPath(), pattern);
    for (String name : systemList) {
        result.add(Utils.getClassNameFromClassFileName(name));
    }//from   ww  w . j  a v  a2 s. c o m

    for (SyntheticRepository repository : cpRepositories) {
        final Collection<String> cpList = ResourceList.getResources(repository.getClassPath(), pattern);
        for (String name : cpList) {
            result.add(Utils.getClassNameFromClassFileName(name));
        }
    }

    return result;
}