Here you can find the source of getClassName(Path pluginImplementationDirectory, Path classFile)
private static String getClassName(Path pluginImplementationDirectory, Path classFile)
//package com.java2s; //License from project: Apache License import java.nio.file.Path; public class Main { private static final String PACKAGE_SEPARATOR = "."; private static final String CLASS_FILE_EXTENSION = ".class"; private static final String JAR_DIRECTORY_SEPARATOR = "/"; private static String getClassName(Path pluginImplementationDirectory, Path classFile) { String className = pluginImplementationDirectory.relativize(classFile).toString() .replace(JAR_DIRECTORY_SEPARATOR, PACKAGE_SEPARATOR).replace(CLASS_FILE_EXTENSION, ""); if (className.startsWith(PACKAGE_SEPARATOR) && className.length() > 1) { className = className.substring(1); }/*from w w w.ja v a 2 s. c o m*/ return className; } }