Class MatchContext
java.lang.Object
io.micronaut.data.processor.visitors.MatchContext
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource
- Direct Known Subclasses:
MethodMatchContext
@Internal
public class MatchContext
extends Object
implements io.micronaut.core.annotation.AnnotationMetadataProvider
A match context when matching methods.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.micronaut.inject.ast.MethodElementprotected final io.micronaut.inject.ast.ParameterElement[]protected final io.micronaut.inject.ast.ClassElementprotected final io.micronaut.inject.visitor.VisitorContextFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionvoidFail compilation with the given message for the current method.io.micronaut.core.annotation.AnnotationMetadataMap<io.micronaut.inject.ast.ClassElement, FindInterceptorDef> io.micronaut.inject.ast.MethodElementio.micronaut.inject.ast.ParameterElement[]io.micronaut.inject.ast.ClassElementio.micronaut.inject.ast.ClassElementio.micronaut.inject.visitor.VisitorContextbooleanAre there possible failures.booleanisTypeInRole(io.micronaut.inject.ast.ClassElement type, String role) Check whether the given type performs the given role.voidLog any possible failures.booleanWhether implicit queries such as lookup by id and counting is supported without an explicit query.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
-
Field Details
-
visitorContext
protected final io.micronaut.inject.visitor.VisitorContext visitorContext -
methodElement
protected final io.micronaut.inject.ast.MethodElement methodElement -
typeRoles
-
annotationRoles
-
returnType
protected final io.micronaut.inject.ast.ClassElement returnType -
parameters
protected final io.micronaut.inject.ast.ParameterElement[] parameters
-
-
Method Details
-
getQueryBuilder
- Returns:
- The active query builder
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
isTypeInRole
Check whether the given type performs the given role.- Parameters:
type- The typerole- The role- Returns:
- True if it is
-
getVisitorContext
public io.micronaut.inject.visitor.VisitorContext getVisitorContext()- Returns:
- The visitor context
-
getMethodElement
public io.micronaut.inject.ast.MethodElement getMethodElement()- Returns:
- The method element
-
getReturnType
public io.micronaut.inject.ast.ClassElement getReturnType()- Returns:
- The return type
-
getParameters
public io.micronaut.inject.ast.ParameterElement[] getParameters()- Returns:
- The parameters
-
fail
Fail compilation with the given message for the current method.- Parameters:
message- The message
-
isPossiblyFailing
public boolean isPossiblyFailing()Are there possible failures.- Returns:
- True if there is an error
-
logPossibleFailures
public void logPossibleFailures()Log any possible failures. -
supportsImplicitQueries
public boolean supportsImplicitQueries()Whether implicit queries such as lookup by id and counting is supported without an explicit query.- Returns:
- True if it is
-
getRepositoryClass
public io.micronaut.inject.ast.ClassElement getRepositoryClass()- Returns:
- The repository class.
-
getUnableToImplementMessage
- Returns:
- The message to print in the case of no possible implementations.
-
getFindInterceptors
- Returns:
- The find interceptors
-