Class NamingConventions

java.lang.Object
com.google.errorprone.names.NamingConventions

public final class NamingConventions extends Object
Utility functions for dealing with Java naming conventions
  • Method Details

    • splitToLowercaseTerms

      public static com.google.common.collect.ImmutableList<String> splitToLowercaseTerms(String identifierName)
      Split a Java name into terms based on either Camel Case or Underscores. We also split digits at the end of the name into a separate term so as to treat PERSON1 and PERSON_1 as the same thing.
      Parameters:
      identifierName - to split
      Returns:
      a list of the terms in the name, in order and converted to lowercase
    • convertToLowerUnderscore

      public static String convertToLowerUnderscore(String identifierName)