Example usage for java.lang Class getName

List of usage examples for java.lang Class getName

Introduction

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

Prototype

public String getName() 

Source Link

Document

Returns the name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String .

Usage

From source file:br.mdarte.exemplo.academico.SistemaacademicoLogger.java

public static synchronized void info(Object mensagem, Class classe) {
    log.info("[" + classe.getName() + "]" + mensagem);
}

From source file:br.mdarte.exemplo.academico.SistemaacademicoLogger.java

public static synchronized void warn(Object mensagem, Class classe) {
    log.warn("[" + classe.getName() + "]" + mensagem);
}

From source file:br.mdarte.exemplo.academico.SistemaacademicoLogger.java

public static synchronized void debug(Object mensagem, Class classe) {
    log.debug("[" + classe.getName() + "]" + mensagem);
}

From source file:br.mdarte.exemplo.academico.SistemaacademicoLogger.java

public static synchronized void error(Object mensagem, Class classe) {
    log.error("[" + classe.getName() + "]" + mensagem);
}

From source file:br.mdarte.exemplo.academico.SistemaacademicoLogger.java

public static synchronized void fatal(Object mensagem, Class classe) {
    log.fatal("[" + classe.getName() + "]" + mensagem);
}

From source file:br.mdarte.exemplo.academico.SistemaacademicoLogger.java

public static synchronized void trace(Object mensagem, Class classe) {
    log.trace("[" + classe.getName() + "]" + mensagem);
}

From source file:com.topsoft.botspider.io.UnionData.java

public static void setParseClass(Job job, Class[] parseClass) {
    if (job == null || parseClass == null)
        return;//from www.  java  2s  .com
    ArrayList<String> arrParse = new ArrayList<String>(parseClass.length);
    for (Class clzss : parseClass) {
        arrParse.add(clzss.getName());
    }
    job.getConfiguration().setStrings(UNION_CLASS, arrParse.toArray(new String[arrParse.size()]));
}

From source file:Main.java

public static void addClassMapping(String paramString, Class<?> paramClass) {
    if (paramString == null) {
        paramString = paramClass.getName();
    }// ww  w  . j  a va2s . com
    mappings.put(paramString, paramClass);
}

From source file:Util.java

public static String getUnqualifiedName(Class<?> clazz) {
    if (clazz == null)
        return "";
    String name = clazz.getName();
    return (name.substring(name.lastIndexOf('.') + 1));
}

From source file:ch.systemsx.cisd.openbis.generic.client.web.server.translator.UserFailureExceptionTranslator.java

private static String getPackageName(Class<?> clazz) {
    String fullName = clazz.getName();
    return fullName.substring(0, fullName.length() - clazz.getSimpleName().length() - 1);
}