Java Class Name Format classToPath(String name, boolean resource)

Here you can find the source of classToPath(String name, boolean resource)

Description

class To Path

License

Open Source License

Declaration

static String classToPath(String name, boolean resource) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static String classToPath(String name, boolean resource) {
        boolean i18nClass = false;
        String propSuffix = ".properties";
        if (name.startsWith("com.pari.client.Helper") || name.startsWith("com.pari.server.Helper")) {
            i18nClass = true;//from w  w  w . j  av a2  s . c om
        }
        String classsuffix = ".class";
        char oldChar = '.';
        char newChar = '/';
        name = name.replace(oldChar, newChar);
        if (i18nClass) {
            name = name + propSuffix;
        } else {
            if (!resource) {
                name = name + classsuffix;
            }
        }
        return name;
    }
}

Related

  1. classToFilename(Class clazz)
  2. classToFileName(String str)
  3. classToInstance(String uriClass)
  4. classToLDAPName(Class c)
  5. classToPath(Class clazz)
  6. classToResource(String className)
  7. classToResourceKeyPrefix(final Class clazz)
  8. classToResourceName(Class clazz)
  9. classToSignatureIdentifier(Class clazz)