public static ArrayType asArray(TypeMirror maybeArrayType) {
    return maybeArrayType.accept(ArrayTypeVisitor.INSTANCE, null);
  }
Returns a {@link ArrayType} if the {@link TypeMirror} represents an array or throws an {@link
IllegalArgumentException}.
common/src/main/java/com/google/auto/common/MoreTypes.java