Java String Sanitize sanitizeClassName(String s)

Here you can find the source of sanitizeClassName(String s)

Description

Removes package names in instances where Class#getSimpleName() cannot be called, i.e.

License

Open Source License

Parameter

Parameter Description
s the unsanitized class name

Return

the sanitized class name

Declaration

public static String sanitizeClassName(String s) 

Method Source Code

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

public class Main {
    /**//  w w w. j  av  a 2s .com
     * Removes package names in instances where {@link Class#getSimpleName()} cannot be called, i.e. reflection.
     * @param s the unsanitized class name
     * @return the sanitized class name
     */
    public static String sanitizeClassName(String s) {
        return s.substring(s.lastIndexOf(".") + 1);
    }
}

Related

  1. sanitizeAttribute(String value)
  2. sanitizeBranchName(String currentBranch)
  3. sanitizeBrowserName(String browserName)
  4. sanitizeChatMessage(String message)
  5. sanitizeClassname(String classname)
  6. sanitizeColumn(String colName, String relationName)
  7. sanitizeCompletion(String replace)
  8. sanitizeDescription(String description)
  9. sanitizeDir(String name)