代码有四个组成,分别为:main、userEntity、SetTable、SetPropertity
package com.wang.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
/**
*
* @methodDesc: 功能描述:(使用java自定义注解,模拟ORM框架注解)
* @author: 王帅发
* @param: @return
* @createTime:2020年2月27日
* @returnType:@return String
*
*/
public class Main {
public static void main(String[] args) throws ClassNotFoundException {
//反射Class
Class<?> forName = Class.forName("com.wang.annotation.UserEntity");
//getAnnotations当前类使用哪些注解
/* Annotation[] annotations = forName.getAnnotations();
for ( Annotation annotation:annotations) {
System.out.println(annotation);
}*/
//getAnnotation 当前类使用的某个注解对象
/*SetPropertity forNameAnnotation =