Class ScalaAnnotatingVisitor
java.lang.Object
io.micronaut.scala.processing.test.ScalaAnnotatingVisitor
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind -
Field Summary
FieldsFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish(io.micronaut.inject.visitor.VisitorContext visitorContext) intgetOrder()voidstart(io.micronaut.inject.visitor.VisitorContext visitorContext) voidvisitClass(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext context) voidvisitMethod(io.micronaut.inject.ast.MethodElement element, io.micronaut.inject.visitor.VisitorContext context) static <T> TwithAnnotations(Supplier<T> supplier) Executes a compilation with this visitor enabled.static <T> TwithClassAnnotation(String annotationName, Supplier<T> supplier) Executes a compilation with this visitor adding the given annotation to classes.static <T> TwithClassFailure(RuntimeException exception, Supplier<T> supplier) Executes a compilation with this visitor failing when it visits a class.static <T> TwithFinishFailure(RuntimeException exception, Supplier<T> supplier) Executes a compilation with this visitor failing when visitor processing finishes.static <T> TwithMethodAnnotation(String annotationName, Supplier<T> supplier) Executes a compilation with this visitor adding the given annotation to methods.static <T> TwithStartFailure(RuntimeException exception, Supplier<T> supplier) Executes a compilation with this visitor failing when visitor processing starts.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabledMethods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
getClassType, getElementType, getSupportedAnnotationNames, getSupportedOptions, getVisitorKind, query, visitConstructor, visitEnumConstant, visitField
-
Field Details
-
ANN
-
-
Constructor Details
-
ScalaAnnotatingVisitor
public ScalaAnnotatingVisitor()
-
-
Method Details
-
withAnnotations
Executes a compilation with this visitor enabled.- Type Parameters:
T- The result type- Parameters:
supplier- The compilation work- Returns:
- The supplier result
-
withClassAnnotation
Executes a compilation with this visitor adding the given annotation to classes.- Type Parameters:
T- The result type- Parameters:
annotationName- The annotation namesupplier- The compilation work- Returns:
- The supplier result
-
withMethodAnnotation
Executes a compilation with this visitor adding the given annotation to methods.- Type Parameters:
T- The result type- Parameters:
annotationName- The annotation namesupplier- The compilation work- Returns:
- The supplier result
-
withStartFailure
Executes a compilation with this visitor failing when visitor processing starts.- Type Parameters:
T- The result type- Parameters:
exception- The exception to throwsupplier- The compilation work- Returns:
- The supplier result
-
withClassFailure
Executes a compilation with this visitor failing when it visits a class.- Type Parameters:
T- The result type- Parameters:
exception- The exception to throwsupplier- The compilation work- Returns:
- The supplier result
-
withFinishFailure
Executes a compilation with this visitor failing when visitor processing finishes.- Type Parameters:
T- The result type- Parameters:
exception- The exception to throwsupplier- The compilation work- Returns:
- The supplier result
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceio.micronaut.core.order.Ordered
-
start
-
visitClass
-
visitMethod
-
finish
-