public static String classfilePathToClassName(final String classfilePath) {
        if (!classfilePath.endsWith(".class")) {
            throw new IllegalArgumentException("Classfile path does not end with \".class\": " + classfilePath);
        }
        return classfilePath.substring(0, classfilePath.length() - 6).replace('/', '.');
    }
public static String classfilePathToClassName ( final String classfilePath ) { if ( ! classfilePath . endsWith ( ".class" ) ) { throw new IllegalArgumentException ( "Classfile path does not end with \".class\": " + classfilePath ) ; } return classfilePath . substring ( 0 , classfilePath . length ( ) - 6 ) . replace ( '/' , '.' ) ; }
Convert a classfile path to the corresponding class name.

@param classfilePath
the classfile path
@return the class name