Java Class Simple Name Get toSimpleName(Class type)

Here you can find the source of toSimpleName(Class type)

Description

to Simple Name

License

Open Source License

Declaration

public static String toSimpleName(Class<?> type) 

Method Source Code

//package com.java2s;
// under the terms of the GNU Lesser General Public License as published

public class Main {
    public static String toSimpleName(Class<?> type) {
        String name = type.getName().substring(type.getName().lastIndexOf(".") + 1);
        // inner classes are not supported by ActionScript so we _
        return name.replaceAll("\\$", "_");
    }//ww w . j ava 2  s .c  o m
}

Related

  1. simpleName(String qualifiedName)
  2. simpleName(String type)
  3. simpleNameFromQualifiedName(String qualifiedName)
  4. simpleNameOf(String s)
  5. simpleNameWithoutEnhance(Class clazz)
  6. toSimpleName(final String qualifiedName)
  7. toSimpleName(String className)
  8. toSimpleName(String classPackageName)
  9. toSimpleName(String fqn)