Java Class Name Get classname(Class javaClass)

Here you can find the source of classname(Class javaClass)

Description

classname

License

Open Source License

Declaration

public static String classname(Class javaClass) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String classname(Class javaClass) {
        String jClassName = javaClass.getName();
        return classname(jClassName);
    }//from  w w  w  . ja  v a2  s .  c  om

    public static String classname(String jClassName) {
        int lastDotPos = jClassName.lastIndexOf(".");
        return jClassName.substring(lastDotPos + 1, jClassName.length());
    }
}

Related

  1. className(Class type)
  2. className(Class aClass)
  3. className(final Class c)
  4. className(final Object object)