public final class SpoonUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Optional<spoon.reflect.declaration.CtAnnotation<? extends Annotation>> |
getAnnotation(spoon.reflect.reference.CtTypeReference<?> ctTypeReference,
String annotationFQN) |
static Set<spoon.reflect.declaration.CtAnnotation<? extends Annotation>> |
getAnnotationsIncludingFromSuperclasses(spoon.reflect.declaration.CtClass<?> ctClass) |
static boolean |
hasAnnotation(spoon.reflect.reference.CtTypeReference<?> ctTypeReference,
String annotationFQN) |
public static Set<spoon.reflect.declaration.CtAnnotation<? extends Annotation>> getAnnotationsIncludingFromSuperclasses(spoon.reflect.declaration.CtClass<?> ctClass)
ctClass
- the class for which to find the annotations forpublic static boolean hasAnnotation(spoon.reflect.reference.CtTypeReference<?> ctTypeReference, String annotationFQN)
ctTypeReference
- the type for which to find the annotation forannotationFQN
- the FQN class name of the annotationpublic static Optional<spoon.reflect.declaration.CtAnnotation<? extends Annotation>> getAnnotation(spoon.reflect.reference.CtTypeReference<?> ctTypeReference, String annotationFQN)
ctTypeReference
- the type for which to find the annotation forannotationFQN
- the FQN class name of the annotationCopyright © 2004–2021 XWiki. All rights reserved.