Here you can find the source of classNameFromQualifiedClassName(String qualifiedName)
Parameter | Description |
---|---|
qualifiedName | a parameter |
public static String classNameFromQualifiedClassName(String qualifiedName)
//package com.java2s; public class Main { /**/*from w w w .j a v a 2 s. c o m*/ * Return only class name of a full qualified (package+classname) string. * * @param qualifiedName * @return */ public static String classNameFromQualifiedClassName(String qualifiedName) { if (qualifiedName == null) { throw new IllegalArgumentException("qualifiedName can't be null!"); } int dot_index = qualifiedName.lastIndexOf('.'); if (dot_index != -1) return qualifiedName.substring(dot_index + 1); else return qualifiedName; } }