Class StringUtils


  • public final class StringUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      StringUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String capitalize​(java.lang.String str)  
      static java.lang.String getGetterName​(java.lang.String methodName, boolean bool, boolean fluent)  
      static java.lang.String getGetterName​(java.lang.String methodName, com.squareup.javapoet.TypeName type, boolean fluent)  
      static java.lang.String getGetterName​(java.lang.String methodName, javax.lang.model.type.TypeMirror type, boolean fluent)  
      static java.lang.String getMethodName​(java.lang.String preferenceName)  
      static java.lang.String getSetterName​(java.lang.String methodName, boolean fluent)  
      static boolean isFQCN​(java.lang.String string)
      Checks whether the given string is a fully qualified class name as per JLS 6.7, i.e.
      static boolean isJavaIdentifier​(java.lang.String string)
      Checks whether the given string is an identifier as per JLS 3.8, i.e.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringUtils

        public StringUtils()
    • Method Detail

      • isJavaIdentifier

        public static boolean isJavaIdentifier​(java.lang.String string)
        Checks whether the given string is an identifier as per JLS 3.8, i.e. it starts with a Java Letter and all the remaining characters are Java Letters or Digits.
        Parameters:
        string - the string to be checked
      • isFQCN

        public static boolean isFQCN​(java.lang.String string)
        Checks whether the given string is a fully qualified class name as per JLS 6.7, i.e. a dot-seperated list of identifiers.
        Parameters:
        string - the string to be checked
      • getMethodName

        public static java.lang.String getMethodName​(java.lang.String preferenceName)
      • getGetterName

        public static java.lang.String getGetterName​(java.lang.String methodName,
                                                     com.squareup.javapoet.TypeName type,
                                                     boolean fluent)
      • getGetterName

        public static java.lang.String getGetterName​(java.lang.String methodName,
                                                     javax.lang.model.type.TypeMirror type,
                                                     boolean fluent)
      • getGetterName

        public static java.lang.String getGetterName​(java.lang.String methodName,
                                                     boolean bool,
                                                     boolean fluent)
      • getSetterName

        public static java.lang.String getSetterName​(java.lang.String methodName,
                                                     boolean fluent)
      • capitalize

        public static java.lang.String capitalize​(java.lang.String str)