Class TypeNameClassifier


  • public final class TypeNameClassifier
    extends java.lang.Object
    Heuristics for classifying qualified names as types.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TypeNameClassifier()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.util.Optional<java.lang.Integer> typePrefixLength​(java.util.List<java.lang.String> nameParts)
      Returns the end index (inclusive) of the longest prefix that matches the naming conventions of a type or static field access, or -1 if no such prefix was found.
      • Methods inherited from class java.lang.Object

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

      • TypeNameClassifier

        private TypeNameClassifier()
    • Method Detail

      • typePrefixLength

        static java.util.Optional<java.lang.Integer> typePrefixLength​(java.util.List<java.lang.String> nameParts)
        Returns the end index (inclusive) of the longest prefix that matches the naming conventions of a type or static field access, or -1 if no such prefix was found.

        Examples:

        • ClassName
        • ClassName.staticMemberName
        • com.google.ClassName.InnerClass.staticMemberName