Java Path Create toPath(String groupId)

Here you can find the source of toPath(String groupId)

Description

to Path

License

Open Source License

Declaration

private static String toPath(String groupId) 

Method Source Code

//package com.java2s;
/*//from   w w w . j a  v  a  2 s.co  m
 * AutoRefactor - Eclipse plugin to automatically refactor Java code bases.
 *
 * Copyright (C) 2014 Jean-No?l Rouvignac - initial API and implementation
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program under LICENSE-GNUGPL.  If not, see
 * <http://www.gnu.org/licenses/>.
 *
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution under LICENSE-ECLIPSE, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 */

public class Main {
    private static String toPath(String groupId) {
        final StringBuilder sb = new StringBuilder(groupId);
        int length = sb.length();
        for (int i = 0; i < length; i++) {
            if (sb.charAt(i) == '.') {
                sb.setCharAt(i, '/');
            }
        }
        return sb.toString();
    }
}

Related

  1. makePathName(String directoryName, String fileName)
  2. makePathRelativeTo(String path, final File basedir)
  3. makePaths(File path)
  4. toPath(Class klazz)
  5. toPath(Object[] path)
  6. toPath(String id)
  7. toPath(String pathName)
  8. toPath(String srcPath, boolean nodeModelSource)
  9. toPath(String... paths)