這裏使用的是:3.9 的版本,還是比較新的
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>
isValidAnnotationMemberType(Class<?> type) 檢測是否爲有效的類型() 基本類型、枚舉、註解、封裝的String、Class
AnnotationUtils.isValidAnnotationMemberType(short.class); // 基本類型 true
AnnotationUtils.isValidAnnotationMemberType(SuppressWarnings.class); // 註解類型 true
AnnotationUtils.isValidAnnotationMemberType(ElementType.class); // ElementType(枚舉類型) true
AnnotationUtils.isValidAnnotationMemberType(QcTemplate.class); // 其它引用類型 false
就一個公共方法 ...