Class StringUtils
- java.lang.Object
-
- eu.jonahbauer.android.preference.annotations.processor.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.Stringcapitalize(java.lang.String str)static java.lang.StringgetGetterName(java.lang.String methodName, boolean bool, boolean fluent)static java.lang.StringgetGetterName(java.lang.String methodName, com.squareup.javapoet.TypeName type, boolean fluent)static java.lang.StringgetGetterName(java.lang.String methodName, javax.lang.model.type.TypeMirror type, boolean fluent)static java.lang.StringgetMethodName(java.lang.String preferenceName)static java.lang.StringgetSetterName(java.lang.String methodName, boolean fluent)static booleanisFQCN(java.lang.String string)Checks whether the given string is a fully qualified class name as per JLS 6.7, i.e.static booleanisJavaIdentifier(java.lang.String string)Checks whether the given string is an identifier as per JLS 3.8, i.e.
-
-
-
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)
-
-