Example usage for java.lang Class getSimpleName

List of usage examples for java.lang Class getSimpleName

Introduction

In this page you can find the example usage for java.lang Class getSimpleName.

Prototype

public String getSimpleName() 

Source Link

Document

Returns the simple name of the underlying class as given in the source code.

Usage

From source file:Main.java

public static String getCacheKeyForId(String id, Class<?> clazz) {
    return clazz.getSimpleName() + "_" + id.toString();
}

From source file:Main.java

/**
 * <pre>//from   w  w  w  .  j a v a 2  s  .  co  m
 * Get name of a class.
 * </pre>
 */
@SuppressWarnings("rawtypes")
public static String getTag(Class c) {
    return c.getSimpleName();
}

From source file:Main.java

public static String getShortClassName(Class<?> clazz) {
    return clazz.getSimpleName();
}

From source file:Main.java

/**
 * returns simple name of class//from   ww w.j a  va 2s .c om
 *
 * @param c class which is to be named
 * @return simple name of class
 */
public static String getTag(Class c) {
    return c.getSimpleName();
}

From source file:Main.java

public static void printLogD(Class<?> c, String log) {
    Log.d(c.getSimpleName(), log);
}

From source file:Main.java

public static void printLogW(Class<?> c, String log) {
    Log.w(c.getSimpleName(), log);
}

From source file:Main.java

public static void printLogI(Class<?> c, String log) {
    Log.i(c.getSimpleName(), log);
}

From source file:Main.java

public static String makLogTag(Class cls) {
    return makLogTag(cls.getSimpleName());
}

From source file:Main.java

public static void i(Class tag, String msg) {
    Log.i(tag.getSimpleName(), msg);
}

From source file:Main.java

public static String makeLogTag(Class<?> cls) {
    return "xmpppush_" + cls.getSimpleName();
}