Class MethodMatchContext
- java.lang.Object
-
- io.micronaut.data.processor.visitors.MatchContext
-
- io.micronaut.data.processor.visitors.MethodMatchContext
-
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider
,io.micronaut.core.annotation.AnnotationSource
public class MethodMatchContext extends MatchContext
A match context for finding a matching method.- Since:
- 1.0
- Author:
- graemerocher
-
-
Field Summary
-
Fields inherited from class io.micronaut.data.processor.visitors.MatchContext
methodElement, parameters, returnType, typeRoles, visitorContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourcePersistentEntity
getEntity(io.micronaut.inject.ast.ClassElement element)
Resolves an entity.java.util.Map<java.lang.String,io.micronaut.inject.ast.Element>
getParametersInRole()
java.util.List<io.micronaut.inject.ast.ParameterElement>
getParametersNotInRole()
Returns a list of parameters that are not fulfilling a specific query role.SourcePersistentEntity
getRootEntity()
The root entity being queried.boolean
hasParameterInRole(java.lang.String role)
Check whether a parameter is available in the given role.-
Methods inherited from class io.micronaut.data.processor.visitors.MatchContext
fail, getAnnotationMetadata, getMethodElement, getParameters, getQueryBuilder, getRepositoryClass, getReturnType, getUnableToImplementMessage, getVisitorContext, isFailing, isPossiblyFailing, isTypeInRole, logPossibleFailures, possiblyFail, supportsImplicitQueries
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
-
-
-
-
Method Detail
-
hasParameterInRole
public boolean hasParameterInRole(@NonNull java.lang.String role)
Check whether a parameter is available in the given role.- Parameters:
role
- The role- Returns:
- True if there is a parameter available in the given role
-
getParametersInRole
@NonNull public java.util.Map<java.lang.String,io.micronaut.inject.ast.Element> getParametersInRole()
- Returns:
- Parameters that fulfill a query execution role
-
getRootEntity
@NonNull public SourcePersistentEntity getRootEntity()
The root entity being queried.- Returns:
- The root entity
-
getParametersNotInRole
@NonNull public java.util.List<io.micronaut.inject.ast.ParameterElement> getParametersNotInRole()
Returns a list of parameters that are not fulfilling a specific query role.- Returns:
- The parameters not in role
-
getEntity
@NonNull public SourcePersistentEntity getEntity(@NonNull io.micronaut.inject.ast.ClassElement element)
Resolves an entity.- Parameters:
element
- The element- Returns:
- The entity
-
-