Here you can find the source of classToLDAPName(Class c)
Parameter | Description |
---|---|
str | the name to convert |
static String classToLDAPName(Class c)
//package com.java2s; /**/*ww w.j a v a 2 s . c o m*/ * Project Wonderland * * Copyright (c) 2004-2009, Sun Microsystems, Inc., All Rights Reserved * * Redistributions in source code form must reproduce the above * copyright and this condition. * * The contents of this file are subject to the GNU General Public * License, Version 2 (the "License"); you may not use this file * except in compliance with the License. A copy of the License is * available at http://www.opensource.org/licenses/gpl-license.php. * * Sun designates this particular file as subject to the "Classpath" * exception as provided by Sun in the License file that accompanied * this code. */ public class Main { /** * convert a full classname like org.site.module.class to an ldap friendly * version by replacing all "." with "-", e.g. returns "org-site-module-class" * @param str the name to convert * @return */ static String classToLDAPName(Class c) { return c.getName().replaceAll("\\.", "-"); } }