You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-hrm-organization/src/com/engine/organization/util/LogAspect.java

41 lines
820 B
Java

package com.engine.organization.util;
import com.engine.organization.annotation.Log;
import java.lang.reflect.Method;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/27
* @Version V1.0
**/
public class LogAspect<T> {
Class<T> clazz;
Method method;
public LogAspect(Class<T> clazz,Method method) {
this.clazz = clazz;
this.method = method;
}
public void start() {
try {
boolean f = method.isAnnotationPresent(Log.class);
if (f) {
Log annotation = method.getAnnotation(Log.class);
String value = annotation.value();
String description = annotation.description();
}
Method[] methods = clazz.getMethods();
} catch (Exception e) {
}
}
}