Class TypeSimplifier


  • public final class TypeSimplifier
    extends Object
    Takes a set of types and a package and determines which of those types can be imported, and how to spell any of the types in the set given those imports.
    Author:
    emcmanus@google.com (Éamonn McManus)
    • Method Detail

      • classNameOf

        public static String classNameOf​(TypeElement type)
        Returns the name of the given type, including any enclosing types but not the package.
      • packageNameOf

        public static String packageNameOf​(TypeElement type)
        Returns the name of the package that the given type is in. If the type is in the default (unnamed) package then the name is the empty string.
      • simpleNameOf

        public static String simpleNameOf​(String s)