package demo;
public @interface UseCase
{
public String value() default "";
}
package demo;
@UseCase("Summary:DEPT_1")
public class DEPT
{
private int DEPTNO;
public final int getDEPTNO()
{
return DEPTNO;
}
public final void setDEPTNO(int dEPTNO)
{
DEPTNO = dEPTNO;
}
@Override
public String toString()
{
return "DEPT [DEPTNO=" + DEPTNO + "]";
}
}
DEPT obj = new DEPT();
怎么通过反射获取到在obj对象的注解UseCase内容?
@UseCase("Summary:DEPT_1")
------解决思路----------------------
不懂帮顶
------解决思路----------------------
getClass().getAnnotations()