Class LookupKey


  • @Immutable
    public class LookupKey
    extends java.lang.Object
    The key for a qualified name lookup; effectively an immutable iterator over parts of a qualified name.
    • Constructor Summary

      Constructors 
      Constructor Description
      LookupKey​(com.google.common.collect.ImmutableList<Tree.Ident> simpleNames)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Tree.Ident first()
      The first simple name in the qualified type name.
      LookupKey rest()
      A LookupKey with the first simple name removed.
      com.google.common.collect.ImmutableList<Tree.Ident> simpleNames()
      The simple names of the type.
      • Methods inherited from class java.lang.Object

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

      • LookupKey

        public LookupKey​(com.google.common.collect.ImmutableList<Tree.Ident> simpleNames)
    • Method Detail

      • first

        public Tree.Ident first()
        The first simple name in the qualified type name.
      • rest

        public LookupKey rest()
        A LookupKey with the first simple name removed.

        Used when resolving qualified top-level names, e.g. java.util.HashMap.Entry might be resolved in the following stages, ending with a resolved class and a LookupKey for any remaining nested type names (which may not be canonical).

        • ((PACKAGE java) (KEY util.HashMap.Entry))
        • ((PACKAGE java.util) (KEY HashMap.Entry))
        • ((CLASS java.util.HashMap) (KEY Entry))
      • simpleNames

        public com.google.common.collect.ImmutableList<Tree.Ident> simpleNames()
        The simple names of the type.