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:Main.java

private static void getClassModifier(Class clazz) {
    int modifier = clazz.getModifiers();

    if (Modifier.isProtected(modifier)) {
        System.out.println(clazz.getName() + " class modifier is protected");
    }//from  ww  w .  jav a  2 s . c  o m

}

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

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

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

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

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

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

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

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

From source file:com.bstek.dorado.core.resource.ResourceManagerUtils.java

public static ResourceManager get(Class<?> bindingType) {
    return get(bindingType.getName());
}

From source file:Main.java

public static void setComponentEnabled(PackageManager packageManager, Context context, Class<?>[] classes,
        boolean enabled) {
    int length = classes.length;
    for (int i = 0; i < length; i++) {
        Class<?> clazz = classes[i];
        final ComponentName c = new ComponentName(context, clazz.getName());
        packageManager.setComponentEnabledSetting(c, enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
    }/*from  ww w  .j  a  va  2s.  c om*/
}

From source file:Main.java

/**
 * Creates a class path name, from a Class.
 *///from  ww w  .ja v a 2s.  c o m
public static String p(Class n) {
    return n.getName().replace('.', '/');
}

From source file:info.magnolia.cms.util.FactoryUtil.java

public static void setDefaultImplementation(Class interf, String impl) {
    props.setProperty(interf.getName(), impl);
}

From source file:info.magnolia.cms.util.FactoryUtil.java

public static void setImplementation(Class interf, String impl) {
    props.setProperty(interf.getName(), impl);
}