public class ElementUtil extends Object
| 构造器和说明 |
|---|
ElementUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Optional<AnnotationMirror> |
getAnnotationMirror(Element element,
Class<? extends Annotation> annotationClass)
Get
AnnotationMirror from given element with given type |
static Optional<AnnotationMirror> |
getAnnotationMirror(Element element,
String annoClzCanonicalName)
Get
AnnotationMirror from given element with given annotation name |
static Optional<AnnotationMirror> |
getAnnotationMirror(Element element,
TypeMirror annotationType)
Get
AnnotationMirror from given element with given type |
public static Optional<AnnotationMirror> getAnnotationMirror(Element element, Class<? extends Annotation> annotationClass)
AnnotationMirror from given element with given typeelement - the element to find annotationannotationClass - the annotation classpublic static Optional<AnnotationMirror> getAnnotationMirror(Element element, TypeMirror annotationType)
AnnotationMirror from given element with given typeelement - the element to find annotationannotationType - the annotation TypeMirrorpublic static Optional<AnnotationMirror> getAnnotationMirror(Element element, String annoClzCanonicalName)
AnnotationMirror from given element with given annotation nameelement - the element to find annotationannoClzCanonicalName - the annotation nameCopyright © 2017. All rights reserved.