Package io.micronaut.context.visitor
Class VisitorUtils
java.lang.Object
io.micronaut.context.visitor.VisitorUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyMixin
(AnnotationValue<Mixin> mixinAnnotation, ClassElement mixin, ClassElement mixinTarget) Applies a mixin to the target class element during compile-time processing.static @NonNull List<ClassElement>
collectImportedElements
(ClassElement element, VisitorContext context)
-
Constructor Details
-
VisitorUtils
public VisitorUtils()
-
-
Method Details
-
collectImportedElements
@NonNull public static @NonNull List<ClassElement> collectImportedElements(ClassElement element, VisitorContext context) -
applyMixin
public static void applyMixin(AnnotationValue<Mixin> mixinAnnotation, ClassElement mixin, ClassElement mixinTarget) Applies a mixin to the target class element during compile-time processing. This involves transferring annotations, fields, methods, and properties from the mixin class to the target class, while adhering to specified conditions and filters. It modifies the target class by augmenting its metadata based on the provided mixin configuration.- Parameters:
mixinAnnotation
- TheAnnotationValue
representing the@Mixin
annotation applied to the mixin class, used to retrieve filter settings.mixin
- TheClassElement
representing the mixin class, which contains the annotations, methods, fields, and properties to be applied.mixinTarget
- TheClassElement
representing the target class to which the mixin is applied, which will be augmented with elements from the mixin class.
-