Here you can find the source of toBinaryClassName(String fileName)
Parameter | Description |
---|---|
fileName | class file name |
public static String toBinaryClassName(String fileName)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w ww. j a v a 2s .co m*/ * Converts a class's file name to a binary name. * * @param fileName class file name * @return class binary name */ public static String toBinaryClassName(String fileName) { if (fileName.startsWith("/")) { fileName = fileName.substring(1); } if (fileName.endsWith(".class")) { fileName = fileName.substring(0, fileName.length() - 6); } fileName = fileName.replace("/", "."); return fileName; } }