Interface FindersUtils
@Internal
public interface FindersUtils
Finders utils.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Internally used for dynamically defining a class element. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic io.micronaut.inject.ast.ClassElement
getAsyncType
(io.micronaut.inject.ast.MethodElement methodElement, io.micronaut.inject.ast.ClassElement returnType) static io.micronaut.inject.ast.ClassElement
getInterceptorElement
(MethodMatchContext matchContext, Class<? extends DataInterceptor> type) Obtain the interceptor element for the given class.static io.micronaut.inject.ast.ClassElement
getInterceptorElement
(MethodMatchContext matchContext, String type) Obtain the interceptor element for the given class name.static boolean
isContainer
(io.micronaut.inject.ast.ClassElement typeArgument, Class<?> containerType) static boolean
isContainer
(io.micronaut.inject.ast.ClassElement typeArgument, String containerType) static boolean
isFutureType
(io.micronaut.inject.ast.MethodElement methodElement, 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
(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) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickCountInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickCountSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickDeleteAllInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickDeleteAllSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickDeleteInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickExistsInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickExistsSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickFindAllSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickFindByIdInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickFindOneInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickFindOneSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickFindPageSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickSaveAllEntitiesInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickSaveEntityInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickSaveOneInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickUpdateAllEntitiesInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> pickUpdateAllSpecInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickUpdateEntityInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> pickUpdateInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> resolveAsyncFindInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement asyncType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> resolveFindInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> resolveInterceptorTypeByOperationType
(boolean hasEntityParameter, boolean hasMultipleEntityParameter, DataMethod.OperationType operationType, MethodMatchContext matchContext) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> resolveReactiveFindInterceptor
(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType, io.micronaut.inject.ast.ClassElement reactiveType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> resolveSyncFindInterceptor
(MethodMatchContext matchContext, @NotNull io.micronaut.inject.ast.ClassElement returnType) static Map.Entry<io.micronaut.inject.ast.ClassElement,
io.micronaut.inject.ast.ClassElement> typeAndInterceptorEntry
(io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.ClassElement interceptor) static Map.Entry<io.micronaut.inject.ast.ClassElement,
Class<? extends DataInterceptor>> typeAndInterceptorEntry
(io.micronaut.inject.ast.ClassElement type, Class<? extends DataInterceptor> interceptor)
-
Method Details
-
resolveInterceptorTypeByOperationType
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> resolveInterceptorTypeByOperationType(boolean hasEntityParameter, boolean hasMultipleEntityParameter, DataMethod.OperationType operationType, MethodMatchContext matchContext) -
pickSaveOneInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickSaveOneInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateAllEntitiesInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickUpdateAllEntitiesInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickDeleteInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteAllInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickDeleteAllInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickSaveEntityInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickSaveEntityInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickSaveAllEntitiesInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickSaveAllEntitiesInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickUpdateInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateEntityInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickUpdateEntityInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
resolveFindInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> resolveFindInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
resolveSyncFindInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> resolveSyncFindInterceptor(@NonNull MethodMatchContext matchContext, @NotNull @NotNull io.micronaut.inject.ast.ClassElement returnType) -
resolveReactiveFindInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> resolveReactiveFindInterceptor(@NonNull MethodMatchContext matchContext, @NonNull io.micronaut.inject.ast.ClassElement returnType, @NonNull io.micronaut.inject.ast.ClassElement reactiveType) -
resolveAsyncFindInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> resolveAsyncFindInterceptor(@NonNull MethodMatchContext matchContext, @NonNull io.micronaut.inject.ast.ClassElement asyncType) -
pickCountInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickCountInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickExistsInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickExistsInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindByIdInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickFindByIdInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindOneInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> pickFindOneInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickCountSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickCountSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickDeleteAllSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickDeleteAllSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindAllSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickFindAllSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindOneSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickFindOneSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickFindPageSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickFindPageSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickUpdateAllSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickUpdateAllSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
pickExistsSpecInterceptor
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> pickExistsSpecInterceptor(MethodMatchContext matchContext, io.micronaut.inject.ast.ClassElement returnType) -
getAsyncType
static io.micronaut.inject.ast.ClassElement getAsyncType(@NonNull io.micronaut.inject.ast.MethodElement methodElement, @NonNull io.micronaut.inject.ast.ClassElement returnType) -
typeAndInterceptorEntry
static Map.Entry<io.micronaut.inject.ast.ClassElement,Class<? extends DataInterceptor>> typeAndInterceptorEntry(io.micronaut.inject.ast.ClassElement type, Class<? extends DataInterceptor> interceptor) -
typeAndInterceptorEntry
static Map.Entry<io.micronaut.inject.ast.ClassElement,io.micronaut.inject.ast.ClassElement> typeAndInterceptorEntry(io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.ClassElement interceptor) -
isFutureType
static boolean isFutureType(io.micronaut.inject.ast.MethodElement methodElement, @Nullable io.micronaut.inject.ast.ClassElement type) -
isReactiveType
static boolean isReactiveType(@Nullable io.micronaut.inject.ast.ClassElement type) -
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) -
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 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 MethodMatchContext matchContext, String type) Obtain the interceptor element for the given class name.- Parameters:
matchContext
- The match contexttype
- The type- Returns:
- The element
-