
com.magictools.core.annotation.scanner.MethodAnnotationScanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magic-tools-all Show documentation
Show all versions of magic-tools-all Show documentation
magic-tools 是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
The newest version!
package com.magictools.core.annotation.scanner;
import com.magictools.core.collection.CollUtil;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Method;
import java.util.List;
/**
* 扫描{@link Method}上的注解
*
* @author huangchengxing
*/
public class MethodAnnotationScanner implements AnnotationScanner {
@Override
public boolean support(AnnotatedElement annotatedElement) {
return annotatedElement instanceof Method;
}
@Override
public List getAnnotations(AnnotatedElement annotatedElement) {
return CollUtil.newArrayList(annotatedElement.getAnnotations());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy