Java Class Name Format classToPath(Class clazz)

Here you can find the source of classToPath(Class clazz)

Description

translates path to class in package notation to standard path notation with addition of .class suffix

License

Open Source License

Parameter

Parameter Description
clazz class in package notation

Return

path representation of class

Declaration

public static String classToPath(Class clazz) 

Method Source Code

//package com.java2s;

public class Main {
    /**//ww  w.  ja v  a 2 s. co m
     * translates path to class in package notation to standard path notation with addition of .class suffix
     * @param clazz class in package notation
     * @return path representation of class
     */
    public static String classToPath(Class clazz) {
        return clazz.getName().replaceAll("\\.", "/") + ".class";
    }
}

Related

  1. classToFile(String name)
  2. classToFilename(Class clazz)
  3. classToFileName(String str)
  4. classToInstance(String uriClass)
  5. classToLDAPName(Class c)
  6. classToPath(String name, boolean resource)
  7. classToResource(String className)
  8. classToResourceKeyPrefix(final Class clazz)
  9. classToResourceName(Class clazz)