docs: @Memoized
    public Type type() {
      int dotIndex = identifier().indexOf('.');
      if (dotIndex == 0) {
        checkArgument(BaseUtils.isIdentifierWithLeadingDot(identifier()));
        return Type.DOT_IDENT;
      } else {
        checkArgument(BaseUtils.isDottedIdentifier(identifier()));
        return dotIndex == -1 ? Type.SINGLE_IDENT : Type.DOTTED_IDENT;
      }
    }