Here you can find the source of classToFileName(String str)
Parameter | Description |
---|---|
str | The string. |
public static String classToFileName(String str)
//package com.java2s; //License from project: Open Source License public class Main { /**/*w ww . j av a 2 s . c o m*/ * A method that gets a class based on its file name. * @param str The string. * @return The modified string. */ public static String classToFileName(String str) { str = str.replace('.', '/'); if (!str.endsWith(".class")) { str = str + ".class"; } return str; } }