Interface FindersUtils
@Internal
public interface FindersUtils
Finders utils.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Internally used for dynamically defining a class element.static final record
The interceptor match. -
Method Summary
Modifier and TypeMethodDescriptionstatic io.micronaut.inject.ast.ClassElement
getAsyncType
(@NonNull io.micronaut.inject.ast.MethodElement methodElement, @NonNull io.micronaut.inject.ast.ClassElement returnType) static List<FindInterceptorDef>
getDefaultInterceptors
(io.micronaut.inject.visitor.VisitorContext visitorContext) static io.micronaut.inject.ast.ClassElement
getInterceptorElement
(@NonNull MethodMatchContext matchContext, Class<? extends DataInterceptor> type) Obtain the interceptor element for the given class.static io.micronaut.inject.ast.ClassElement
getInterceptorElement
(@NonNull MethodMatchContext matchContext, String type) Obtain the interceptor element for the given class name.static boolean
isContainer
(io.micronaut.inject.ast.ClassElement typeArgument, io.micronaut.inject.ast.ClassElement containerType) static boolean
isContainer
(io.micronaut.inject.ast.ClassElement typeArgument, Class<?> containerType) static boolean
isContainer
(io.micronaut.inject.ast.ClassElement typeArgument, String containerType) static boolean
isCursoredPage
(MethodMatchContext methodMatchContext, io.micronaut.inject.ast.ClassElement typeArgument) static boolean
isFutureType
(io.micronaut.inject.ast.MethodElement methodElement, @Nullable io.micronaut.inject.ast.ClassElement type) static boolean
isOneOfContainers
(io.micronaut.inject.ast.ClassElement typeArgument, Class<?>... containers) static boolean
isPage
(MethodMatchContext methodMatchContext, io.micronaut.inject.ast.ClassElement typeArgument) static boolean
isReactiveSingleResult
(io.micronaut.inject.ast.ClassElement returnType) static boolean
isReactiveType
(@Nullable io.micronaut.inject.ast.ClassElement type) static boolean
isSlice
(MethodMatchContext methodMatchContext, io.micronaut.inject.ast.ClassElement typeArgument) static boolean
isValidResultType
(io.micronaut.inject.ast.ClassElement returnType) pickCountInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickCountSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickDeleteAllInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickDeleteAllReturningInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickDeleteAllSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickDeleteInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickExistsInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickExistsSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickFindAllSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickFindByIdInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickFindOneInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickFindOneSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickFindPageSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickProcedureInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickSaveAllEntitiesInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickSaveEntityInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickSaveOneInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickUpdateAllEntitiesInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickUpdateAllSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickUpdateEntityInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) pickUpdateInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) resolveAsyncFindInterceptor
(@NonNull MethodMatchContext matchContext, @NonNull io.micronaut.inject.ast.ClassElement asyncType) resolveFindInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) resolveInterceptorTypeByOperationType
(boolean hasEntityParameter, boolean hasMultipleEntityParameter, DataMethod.OperationType operationType, MethodMatchContext matchContext) resolveReactiveFindInterceptor
(@NonNull MethodMatchContext matchContext, @NonNull io.micronaut.inject.ast.ClassElement returnType, @NonNull io.micronaut.inject.ast.ClassElement reactiveType) resolveSyncFindInterceptor
(@NonNull MethodMatchContext matchContext, @NonNull io.micronaut.inject.ast.ClassElement returnType) typeAndInterceptorEntry
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement type, Class<? extends DataInterceptor> interceptor) typeAndInterceptorEntry
(io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.ClassElement interceptor)
-
Method Details
-
getDefaultInterceptors
static List<FindInterceptorDef> getDefaultInterceptors(io.micronaut.inject.visitor.VisitorContext visitorContext) -
resolveInterceptorTypeByOperationType
static FindersUtils.InterceptorMatch resolveInterceptorTypeByOperationType(boolean hasEntityParameter, boolean hasMultipleEntityParameter, DataMethod.OperationType operationType, MethodMatchContext matchContext) -
pickSaveOneInterceptor
static FindersUtils.InterceptorMatch pickSaveOneInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateAllEntitiesInterceptor
static FindersUtils.InterceptorMatch pickUpdateAllEntitiesInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickProcedureInterceptor
static FindersUtils.InterceptorMatch pickProcedureInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteInterceptor
static FindersUtils.InterceptorMatch pickDeleteInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteAllInterceptor
static FindersUtils.InterceptorMatch pickDeleteAllInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteAllReturningInterceptor
static FindersUtils.InterceptorMatch pickDeleteAllReturningInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickSaveEntityInterceptor
static FindersUtils.InterceptorMatch pickSaveEntityInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickSaveAllEntitiesInterceptor
static FindersUtils.InterceptorMatch pickSaveAllEntitiesInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateInterceptor
static FindersUtils.InterceptorMatch pickUpdateInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateEntityInterceptor
static FindersUtils.InterceptorMatch pickUpdateEntityInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
resolveFindInterceptor
static FindersUtils.InterceptorMatch resolveFindInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
resolveSyncFindInterceptor
static FindersUtils.InterceptorMatch resolveSyncFindInterceptor(@NonNull @NonNull MethodMatchContext matchContext, @NonNull @NonNull io.micronaut.inject.ast.ClassElement returnType) -
resolveReactiveFindInterceptor
static FindersUtils.InterceptorMatch resolveReactiveFindInterceptor(@NonNull @NonNull MethodMatchContext matchContext, @NonNull @NonNull io.micronaut.inject.ast.ClassElement returnType, @NonNull @NonNull io.micronaut.inject.ast.ClassElement reactiveType) -
resolveAsyncFindInterceptor
static FindersUtils.InterceptorMatch resolveAsyncFindInterceptor(@NonNull @NonNull MethodMatchContext matchContext, @NonNull @NonNull io.micronaut.inject.ast.ClassElement asyncType) -
pickCountInterceptor
static FindersUtils.InterceptorMatch pickCountInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickExistsInterceptor
static FindersUtils.InterceptorMatch pickExistsInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindByIdInterceptor
static FindersUtils.InterceptorMatch pickFindByIdInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindOneInterceptor
static FindersUtils.InterceptorMatch pickFindOneInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickCountSpecInterceptor
static FindersUtils.InterceptorMatch pickCountSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteAllSpecInterceptor
static FindersUtils.InterceptorMatch pickDeleteAllSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindAllSpecInterceptor
static FindersUtils.InterceptorMatch pickFindAllSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindOneSpecInterceptor
static FindersUtils.InterceptorMatch pickFindOneSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindPageSpecInterceptor
static FindersUtils.InterceptorMatch pickFindPageSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateAllSpecInterceptor
static FindersUtils.InterceptorMatch pickUpdateAllSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickExistsSpecInterceptor
static FindersUtils.InterceptorMatch pickExistsSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
getAsyncType
static io.micronaut.inject.ast.ClassElement getAsyncType(@NonNull @NonNull io.micronaut.inject.ast.MethodElement methodElement, @NonNull @NonNull io.micronaut.inject.ast.ClassElement returnType) -
typeAndInterceptorEntry
static FindersUtils.InterceptorMatch typeAndInterceptorEntry(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement type, Class<? extends DataInterceptor> interceptor) -
typeAndInterceptorEntry
static FindersUtils.InterceptorMatch typeAndInterceptorEntry(io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.ClassElement interceptor) -
isFutureType
static boolean isFutureType(io.micronaut.inject.ast.MethodElement methodElement, @Nullable @Nullable io.micronaut.inject.ast.ClassElement type) -
isReactiveType
static boolean isReactiveType(@Nullable @Nullable io.micronaut.inject.ast.ClassElement type) -
isCursoredPage
static boolean isCursoredPage(MethodMatchContext methodMatchContext, io.micronaut.inject.ast.ClassElement typeArgument) -
isPage
static boolean isPage(MethodMatchContext methodMatchContext, io.micronaut.inject.ast.ClassElement typeArgument) -
isSlice
static boolean isSlice(MethodMatchContext methodMatchContext, io.micronaut.inject.ast.ClassElement typeArgument) -
isContainer
static boolean isContainer(io.micronaut.inject.ast.ClassElement typeArgument, Class<?> containerType) -
isContainer
static boolean isContainer(io.micronaut.inject.ast.ClassElement typeArgument, io.micronaut.inject.ast.ClassElement containerType) -
isOneOfContainers
static boolean isOneOfContainers(io.micronaut.inject.ast.ClassElement typeArgument, Class<?>... containers) -
isContainer
-
isValidResultType
static boolean isValidResultType(io.micronaut.inject.ast.ClassElement returnType) -
isReactiveSingleResult
static boolean isReactiveSingleResult(io.micronaut.inject.ast.ClassElement returnType) -
getInterceptorElement
static io.micronaut.inject.ast.ClassElement getInterceptorElement(@NonNull @NonNull MethodMatchContext matchContext, Class<? extends DataInterceptor> type) Obtain the interceptor element for the given class.- Parameters:
matchContext
- The match contexttype
- The type- Returns:
- The element
-
getInterceptorElement
static io.micronaut.inject.ast.ClassElement getInterceptorElement(@NonNull @NonNull MethodMatchContext matchContext, String type) Obtain the interceptor element for the given class name.- Parameters:
matchContext
- The match contexttype
- The type- Returns:
- The element
-