Here you can find the source of classFileName(String packageName, String className)
Parameter | Description |
---|---|
packageName | a parameter |
className | a parameter |
public static String classFileName(String packageName, String className)
//package com.java2s; public class Main { /**/*from w ww .j a v a2s.co m*/ * * @param packageName * @param className * @return */ public static String classFileName(String packageName, String className) { return getPackagedFileName(packageName, className, "java"); } /** * @param packageName * name of the package to resolve * @param fileName * name of the file to append * @param fileExtension * extension of the file to append * @return the complete file path consisting of the * packageName+fileName+fileExtension */ public static String getPackagedFileName(String packageName, String fileName, String fileExtension) { StringBuffer filePath = new StringBuffer(70); if (packageName != null && packageName.length() > 0) { filePath.append(packageName.replace(".", "/")); filePath.append("/"); } filePath.append(fileName); filePath.append("."); filePath.append(fileExtension); return filePath.toString(); } }