Here you can find the source of pathToClassName(String path)
Parameter | Description |
---|---|
path | the path to convert |
public static String pathToClassName(String path)
//package com.java2s; public class Main { /**//from w w w . j a v a 2 s .c o m * Converts a path to class name, i.e., replaces "/" by "." and removes the * ".class" extension. * * @param path the path to convert * @return the class name */ public static String pathToClassName(String path) { return path.substring(0, path.length() - 6).replace("/", "."); } }