Package io.micronaut.sourcegen.model
Class AnnotationDef
java.lang.Object
io.micronaut.sourcegen.model.AnnotationDef
The annotation definition.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The annotation definition builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder
(ClassTypeDef type) builder
(Class<? extends Annotation> annotationType) getType()
static AnnotationDef
of
(io.micronaut.core.annotation.AnnotationValue<?> annotation, io.micronaut.inject.visitor.VisitorContext context) Create an annotation definition from anAnnotationValue
annotation.
-
Method Details
-
getType
-
getValues
-
builder
-
builder
public static AnnotationDef.AnnotationDefBuilder builder(Class<? extends Annotation> annotationType) -
of
public static AnnotationDef of(io.micronaut.core.annotation.AnnotationValue<?> annotation, io.micronaut.inject.visitor.VisitorContext context) Create an annotation definition from anAnnotationValue
annotation.Visitor context is required to deduce the types for annotation members, as
AnnotationValue
does not retain such information. The annotation does not need to be present on the classpath, but type mirror information must be retrievable.- Parameters:
annotation
- The annotationcontext
- The visitor context- Returns:
- The copy of given annotation
- Since:
- 1.0
-