Java Utililty Methods Class File Name Get

List of utility methods to do Class File Name Get

Description

The list of methods to do Class File Name Get are organized into topic(s).

Method

StringclassFileName(Class clazz)
Determine the name of the class file, relative to the containing package: e.g.
String className = clazz.getName();
int lastDotIndex = className.lastIndexOf('.');
return className.substring(lastDotIndex + 1) + ".class";
StringclassFileName(Class cl)
class File Name
return cl.getName().replace('.', '/') + ".class";
StringclassFileName(String className)
class File Name
return classFileNameWithType(className, "");
StringclassFileName(String packageName, String className)
class File Name
return getPackagedFileName(packageName, className, "java");
StringclassFileNameFromClassName(String classname)
get Class filename from ClassName
return classname + ".class";
StringclassFileNameWithTypeAndExt(String className, String type, String ext)
class File Name With Type And Ext
return className + type + "." + ext;