Java Class Name Create toClassName(String resourceName)

Here you can find the source of toClassName(String resourceName)

Description

to Class Name

License

Common Public License

Declaration

public static String toClassName(String resourceName) 

Method Source Code

//package com.java2s;
//License from project: Common Public License 

public class Main {
    public static String toClassName(String resourceName) {
        return slashesToDots(resourceName.substring(0, resourceName.lastIndexOf(".")));
    }//from w w w .j  a v a 2s .  c  om

    public static String slashesToDots(String resourceName) {
        return resourceName.replace('/', '.').replace('\\', '.');
    }
}

Related

  1. toClassName(String className)
  2. toClassName(String className)
  3. toClassName(String fileName)
  4. toClassName(String fileName)
  5. toClassName(String internalName)
  6. toClassName(String str)
  7. toClassNames(Class... classes)