Java Java String Format toJavaName(String name)

Here you can find the source of toJavaName(String name)

Description

to Java Name

License

Open Source License

Declaration

public static String toJavaName(String name) 

Method Source Code

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

public class Main {
    public static String toJavaName(String name) {
        if (name != null && !"".equals(name)) {
            String rs = "";
            name = name.toLowerCase();//from  ww w  .  j  av a2  s  . co  m
            String[] names = name.split("_");
            for (String string : names) {
                rs += string.substring(0, 1).toUpperCase() + string.substring(1, string.length());
            }
            return rs;
        }
        return name;
    }
}

Related

  1. toJavaIdentifierString(String className)
  2. toJavaImplClassName(String podName, String typeName)
  3. toJavaImplSig(String jsig)
  4. toJavaMethodName(String sqlNotation)
  5. toJavaMethodName(String... words)
  6. toJavaName(String name)
  7. toJavaPackageName(String name)
  8. toJavaPath(String path)
  9. toJavaPath(String path)