Java Class Name Format classToResourceKeyPrefix(final Class clazz)

Here you can find the source of classToResourceKeyPrefix(final Class clazz)

Description

class To Resource Key Prefix

License

Open Source License

Parameter

Parameter Description
clazz Class

Return

the class name as a string, with inner class separators turned into dots ('.')

Declaration

public static String classToResourceKeyPrefix(final Class<?> clazz) 

Method Source Code

//package com.java2s;
/**// w  ww  .j  av  a  2  s . co m
 * swing-revival:
 * Swing Revival Toolkit
 *
 * Copyright (c) 2009 by Alistair A. Israel.
 *
 * This software is made available under the terms of the MIT License.
 * See LICENSE.txt.
 *
 * Created Sep 30, 2009
 */

public class Main {
    /**
     * @param clazz
     *        {@link Class}
     * @return the class name as a string, with inner class separators turned into dots (<code>'.'</code>)
     */
    public static String classToResourceKeyPrefix(final Class<?> clazz) {
        return clazz.getName().replace('$', '.');
    }
}

Related

  1. classToInstance(String uriClass)
  2. classToLDAPName(Class c)
  3. classToPath(Class clazz)
  4. classToPath(String name, boolean resource)
  5. classToResource(String className)
  6. classToResourceName(Class clazz)
  7. classToSignatureIdentifier(Class clazz)
  8. classToSlashed(String className)
  9. classToString(Class c)