public static int getInt(AnnotationValue value) {
    return valueOfType(value, Integer.class);
  }
Returns the value as an int.

@throws IllegalArgumentException if the value is not an int.
common/src/main/java/com/google/auto/common/AnnotationValues.java