Class VisitorUtils

java.lang.Object
io.micronaut.context.visitor.VisitorUtils

@Internal public class VisitorUtils extends Object
  • 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 - The AnnotationValue representing the @Mixin annotation applied to the mixin class, used to retrieve filter settings.
      mixin - The ClassElement representing the mixin class, which contains the annotations, methods, fields, and properties to be applied.
      mixinTarget - The ClassElement representing the target class to which the mixin is applied, which will be augmented with elements from the mixin class.