Java Class Simple Name Get toSimpleName(String fqn)

Here you can find the source of toSimpleName(String fqn)

Description

to Simple Name

License

Open Source License

Declaration

public static String toSimpleName(String fqn) 

Method Source Code

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

public class Main {
    public static final char FQN_SEPARATOR = '.';

    public static String toSimpleName(String fqn) {
        int lastSeparatorPos = fqn.lastIndexOf(FQN_SEPARATOR);
        if (lastSeparatorPos == -1)
            return fqn;
        else/*from   w  w  w  .ja v a  2s.c o  m*/
            return fqn.substring(lastSeparatorPos + 1);
    }
}

Related

  1. simpleNameWithoutEnhance(Class clazz)
  2. toSimpleName(Class type)
  3. toSimpleName(final String qualifiedName)
  4. toSimpleName(String className)
  5. toSimpleName(String classPackageName)
  6. toSimpleName(String qname)
  7. ToSimpleName(String str)