Java File Object Create toFile(Class cls)

Here you can find the source of toFile(Class cls)

Description

to File

License

Open Source License

Declaration

public static File toFile(Class<?> cls) 

Method Source Code


//package com.java2s;
//License from project: MIT License 

import java.io.File;

public class Main {
    public static File toFile(Class<?> cls) {
        return new File(cls.getName().replace('.', '/') + ".class");
    }/*w w w .  jav a2s  .  co  m*/
}

Related

  1. toFile(byte[] bFile)
  2. toFile(File baseDir, String path)
  3. toFile(File currentDirectory, String file)
  4. toFile(File dir, String[] path)
  5. toFile(File dstPath, String fullClassName)